cpb-generators 0.1.2 → 0.1.3

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: 728d97165e996862f94ce09f50c82dada923568e
4
- data.tar.gz: 04700f2ae74432bc1c20df309ca6531ea8b74ba7
3
+ metadata.gz: 4cee2db2244f9939350efa9450b8f91c1608253d
4
+ data.tar.gz: 692db79c10b103d3c2f6b19f8d1dd21f218b23b0
5
5
  SHA512:
6
- metadata.gz: f8cc88398a07f20d0b82b21d0e4ff52287c21c058354e8238b65429b450b12e3e4038c1e0cc04a69e3d8ec7d51a98f9cd80882bf6efe78aae01d40d987f25693
7
- data.tar.gz: 2b956015ce729ecec5ce8d130f9eeae86e55c4892492aa57713360003ada89bf33a1a7511ada995385fe8d4e7a01581982db784a712394c07047229b67acfe04
6
+ metadata.gz: 3ee2d1f19621704bd1367a3a7527308360e686a73b3270a2b96df25eea56cc7f96997e3b35c42b25db1105d23c7fa6e0af2cc468e1bfc1b2651939e8ac03cdb8
7
+ data.tar.gz: 178a920917eed2ca89a0ceec0449aa62ec39cf51191c3c5081f8e61eb11a1c90eb01ee312f7147a30c3a563f2de80baab28e4c88ed7882f4833b4d31d53b3d59
@@ -10,7 +10,15 @@ Feature: I can install cpb-generators and generate files
10
10
  """
11
11
  And I run `bundle install`
12
12
  When I run `bundle exec cpb entity many/namespace/new_name`
13
- Then a file named "lib/many/namespace/new_name.rb" should exist
13
+ Then the file "lib/many/namespace/new_name.rb" should contain:
14
+ """
15
+ module Many
16
+ module Namespace
17
+ class NewName
18
+ end
19
+ end
20
+ end
21
+ """
14
22
  And a file named "spec/many/namespace/new_name_spec.rb" should exist
15
23
 
16
24
  Scenario: Usage post installation
@@ -46,10 +46,8 @@ module Cpb
46
46
 
47
47
  unless parts.empty?
48
48
  i = parts.length
49
- parts.inject(constant_string(i+1,"class",first_part)) do |memo, namespace|
50
- return_value = constant_string(i,"module",namespace,memo)
51
- i -= 1
52
- return_value
49
+ parts.inject(constant_string(i,"class",first_part)) do |memo, namespace|
50
+ constant_string(i-=1,"module",namespace,memo)
53
51
  end
54
52
  else
55
53
  "class #{first_part}\nend"
@@ -1,5 +1,5 @@
1
1
  module Cpb
2
2
  module Generators
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpb-generators
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
  - Caleb Buxton