codeinventory 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 992cc66fc416b27e661d1aa3519a5bb2530bb06a
4
- data.tar.gz: 500dbda2306c83785d09b89ce7ad63ef07eba0f1
3
+ metadata.gz: 0466434f7ce5176346394af5842accdb4bc649cd
4
+ data.tar.gz: b3f98cf215d6b6f5739d137cb5db87df0e45b8a7
5
5
  SHA512:
6
- metadata.gz: a1ee75116c0d295503b0b7db4411b9e3c2e3796ea7d188b19ff5c2f01771898a2989f0c924446f464afe1641aa160523a9b2d75ece4a6e1360bdb09523f7136f
7
- data.tar.gz: f88d4b3e63b10e470fdef237521fbb186e35768369e10794268de2b514177a638198bde82bf894906913d8621dc90b7fe40285140d5b9794c83b9799a3b43809
6
+ metadata.gz: 47467123b0e59a32e04f744f34e5e951d506920c8c1cb6c64e7c78d70998891094e4260d3d4c0f51a244dbf1e08427cef20aa0413672d24de1ed8bb8864f3731
7
+ data.tar.gz: aec125c4b76b049d8b81fac3663914f4509de0e3178dee1863b8b955a78ebd861dedd74e5c8048cb83addf65c71bfa2257373fe367856ff7584745cba3f5626a
data/exe/codeinv CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require "codeinventory/cli"
4
4
 
5
- CodeInventory::CLI::App.start(ARGV)
5
+ CodeInventory::CLI.start
@@ -0,0 +1,22 @@
1
+ require "thor"
2
+ require "json"
3
+ require "pathname"
4
+
5
+ module CodeInventory
6
+ module CLI
7
+ class App < Thor
8
+ desc "csv FILENAME", "Build an inventory from a CSV file"
9
+ def csv(filename)
10
+ file = Pathname.new(filename)
11
+ unless File.exist? file
12
+ puts "No such file: #{file}"
13
+ exit 1
14
+ end
15
+ source = CodeInventory::CSVFile.new(file)
16
+ inventory = CodeInventory::Inventory.new(source)
17
+ projects = inventory.projects
18
+ puts JSON.pretty_generate(projects)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,23 +1,10 @@
1
- require "codeinventory"
2
1
  require "thor"
2
+ require "json"
3
3
  require "pathname"
4
4
 
5
5
  module CodeInventory
6
6
  module CLI
7
7
  class App < Thor
8
- desc "csv FILENAME", "Build an inventory from a CSV file"
9
- def csv(filename)
10
- file = Pathname.new(filename)
11
- unless File.exist? file
12
- puts "No such file: #{file}"
13
- exit 1
14
- end
15
- source = CodeInventory::CSVFile.new(file)
16
- inventory = CodeInventory::Inventory.new(source)
17
- projects = inventory.projects
18
- puts JSON.pretty_generate(projects)
19
- end
20
-
21
8
  desc "json FILENAME", "Build an inventory from a JSON file"
22
9
  def json(filename)
23
10
  file = Pathname.new(filename)
@@ -1 +1,19 @@
1
- require "codeinventory/cli/app"
1
+ require "codeinventory"
2
+ require "thor"
3
+ require "codeinventory/cli/csv"
4
+ require "codeinventory/cli/json"
5
+
6
+ module CodeInventory
7
+ module CLI
8
+ class App < Thor
9
+ end
10
+
11
+ def self.start
12
+ plugin_files = Gem.find_latest_files('codeinventory_plugin.rb')
13
+ plugin_files.each do |plugin_file|
14
+ load plugin_file
15
+ end
16
+ App.start
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module CodeInventory
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeinventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Fredrickson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-05 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -130,7 +130,8 @@ files:
130
130
  - exe/codeinv
131
131
  - lib/codeinventory.rb
132
132
  - lib/codeinventory/cli.rb
133
- - lib/codeinventory/cli/app.rb
133
+ - lib/codeinventory/cli/csv.rb
134
+ - lib/codeinventory/cli/json.rb
134
135
  - lib/codeinventory/csv_file.rb
135
136
  - lib/codeinventory/inventory.rb
136
137
  - lib/codeinventory/json_file.rb