modables_dsl 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8389a2bcc2c1e7ce17100ba4ac0f70d8b163255
4
- data.tar.gz: dadfcf9c8e3a8173ee21f47698d9347b59b2e7fc
3
+ metadata.gz: 9af9bed6feab77a2019ba6d7d032ecfa9cb2f28b
4
+ data.tar.gz: e92ff3827632fd6c59bb3fb759bc6ac2cacefc5c
5
5
  SHA512:
6
- metadata.gz: 948efd2084ce5f75044db45c2e120b1ccb8566a6cad41879093c1c8fcf3bc7d503250fca0258aacc7906e7df12b218b315d022e0f89201448abfa01c7759d0e9
7
- data.tar.gz: c713d72d8da299c3182810e0e87a74dde7ddc7c5bfc44a85773729313db0fe56c642d305818116676a509ac162da11b6ee265afa54ffb9b0c010cff70255ed01
6
+ metadata.gz: 46b6bd673586cda65b0bde70e606462c7fe1c2e4678af96a65c1f5acc4a27590d1975c1ea0fa50015c6bad7c3415898e86cebf29b7db3b3f4ae668f2b3798539
7
+ data.tar.gz: 2e76bf3ad29cd3bdf2d44e4ed4c0a4d4bca4592760e454de29211d1148218f9b8655ec54084b974e29673f41c9b4a68f5a81473f982d411a9e569c57c46a4ac8
@@ -8,8 +8,8 @@ module ModablesDSL
8
8
  self.opts['config'] = config
9
9
  end
10
10
 
11
- args.on('-f', '--file-ext tf.json', 'JSON output file extension') do |file_ext|
12
- self.opts['file-ext'] = file_ext
11
+ args.on('-e', '--ext-json tf.json', 'JSON file extension') do |ext_json|
12
+ self.opts['ext-json'] = ext_json
13
13
  end
14
14
 
15
15
  args.on('-v', '--version', 'DSL version') do |version|
@@ -6,7 +6,7 @@ module ModablesDSL
6
6
 
7
7
  @config = {
8
8
  'dsl' => {
9
- 'file_ext' => 'moda.json',
9
+ 'ext_json' => 'mo.json',
10
10
  'stack_dirs' => Array.new,
11
11
  }
12
12
  }
@@ -26,7 +26,7 @@ module ModablesDSL
26
26
  ActiveSupport::JSON.encode(@data)
27
27
  end
28
28
 
29
- def self.moda
29
+ def self.morb
30
30
  yield
31
31
  self.encode_json
32
32
  end
@@ -2,17 +2,17 @@ module ModablesDSL
2
2
  module Generate
3
3
 
4
4
  def self.files
5
- self.stack_files.each do |moda_file|
5
+ self.stack_files.each do |morb_file|
6
6
 
7
- file_prefix = moda_file.rpartition('.moda').first
8
- file_suffix = ModablesDSL::Cli.opts['file-ext'] || ModablesDSL::Config.get['dsl']['file_ext']
7
+ file_prefix = morb_file.rpartition('.mo').first
8
+ file_suffix = ModablesDSL::Cli.opts['ext-json'] || ModablesDSL::Config.get['dsl']['ext_json']
9
9
 
10
10
  destination_file = "#{file_prefix}.#{file_suffix}"
11
11
 
12
- ModablesDSL::Message.log.info "Reading from #{moda_file}"
12
+ ModablesDSL::Message.log.info "Reading from #{morb_file}"
13
13
 
14
14
  File.open(destination_file, 'w') do |new_file|
15
- new_file.write ModablesDSL::DSL.instance_eval IO.read moda_file
15
+ new_file.write ModablesDSL::DSL.instance_eval IO.read morb_file
16
16
  end
17
17
 
18
18
  ModablesDSL::Message.log.info "Wrote to #{destination_file}"
@@ -21,23 +21,23 @@ module ModablesDSL
21
21
 
22
22
  def self.stack_files
23
23
 
24
- moda_files = Array.new
24
+ morb_files = Array.new
25
25
  stack_dirs = ModablesDSL::Config.get['dsl']['stack_dirs'] << Dir.pwd
26
26
 
27
27
  stack_dirs.each do |dir|
28
- moda_files += Dir.glob("#{dir}/**/*.moda")
28
+ morb_files += Dir.glob("#{dir}/**/*.mo.rb")
29
29
  end
30
30
 
31
- total_moda_files = moda_files.size
31
+ total_morb_files = morb_files.size
32
32
 
33
- if total_moda_files == 0
34
- ModablesDSL::Message.log.info '0 moda files found.'
33
+ if total_morb_files == 0
34
+ ModablesDSL::Message.log.info '0 morb files found.'
35
35
  exit 0
36
36
  else
37
- ModablesDSL::Message.log.info "#{total_moda_files} moda #{"file".pluralize(total_moda_files)} found"
37
+ ModablesDSL::Message.log.info "#{total_morb_files} morb #{"file".pluralize(total_morb_files)} found"
38
38
  end
39
39
 
40
- moda_files
40
+ morb_files
41
41
  end
42
42
 
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module ModablesDSL
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modables_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Modables
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-22 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport