Skip to content

Commit dba8a30

Browse files
yaronskayaanatolystansler
authored andcommitted
wip: rails (#145) (#159)
1 parent 6f01706 commit dba8a30

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/kotlin/app/extractors/RubyExtractor.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class RubyExtractor : ExtractorInterface {
3333
}
3434
}
3535

36+
// TODO(lyaronskaya): read external files
37+
imports.add("rails")
38+
3639
return imports.toList()
3740
}
3841

src/test/kotlin/test/tests/extractors/ExtractorTest.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ class ExtractorTest : Spek({
110110
assertExtractsLineLibraries("com.github.kittinunf.fuel",
111111
line, KotlinExtractor())
112112
}
113+
114+
it("ruby extractor extracts rails") {
115+
val line = "class Article < ApplicationRecord"
116+
assertExtractsLineLibraries("rails",
117+
line, RubyExtractor())
118+
}
113119
}
114120

115121
given("code line doesn't use libraries" ) {
@@ -239,4 +245,5 @@ class ExtractorTest : Spek({
239245
assertTrue(lib in actualLineImports)
240246
}
241247
}
248+
242249
})

0 commit comments

Comments
 (0)