dslable 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -987,6 +987,9 @@ All Tasks Finish!!
987
987
  * this gem uses 'tudu' command to create Workflow (tudu gem).
988
988
 
989
989
  ## History
990
+ * version 0.0.4 : delete Core#init spec generation
991
+ * version 0.0.4 : delete Hash default brace.
992
+ * version 0.0.3 : add using class Boolean(true or class).
990
993
  * version 0.0.2 : add workflow generation by 'tudu gem'.
991
994
  * version 0.0.1 : first release.
992
995
 
@@ -1,3 +1,3 @@
1
1
  module Dslable
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -104,6 +104,7 @@ end
104
104
  if default_value.nil?
105
105
  method("nil_default_#{klass.to_s.downcase}").call
106
106
  else
107
+ default_value = default_value.to_s.delete!('{').delete!('}') if field._args._klass == Hash
107
108
  klass == String ? "\"#{default_value}\"" : default_value
108
109
  end
109
110
  end
@@ -117,7 +118,8 @@ end
117
118
  end
118
119
 
119
120
  def nil_default_hash
120
- { 'your key' => 'your value' }
121
+ ret = { 'your key' => 'your value' }.to_s.delete!('{').delete!('}')
122
+ ret
121
123
  end
122
124
 
123
125
  def nil_default_boolean
@@ -21,7 +21,7 @@ module Dslable::Generators::RSpec
21
21
  def generate_core
22
22
  core_class_name = "#{@dsl.camelized_gem_name}::Core"
23
23
  core_class_file_name = "#{@dsl._gem_name}_core"
24
- `piccolo e #{core_class_name} #{core_class_file_name} init execute`
24
+ `piccolo e #{core_class_name} #{core_class_file_name} execute`
25
25
  end
26
26
  end
27
27
  end
@@ -33,8 +33,8 @@ field2 ["default1", "default2"]
33
33
  # field_desc3
34
34
  # args3 is required
35
35
  # args3 allow only Hash
36
- # args3's default value => {:default_key=>"default_value"}
37
- field3 {:default_key=>"default_value"}
36
+ # args3's default value => :default_key=>"default_value"
37
+ field3 :default_key=>"default_value"
38
38
 
39
39
  # field_desc4
40
40
  # args4 allow only String
@@ -46,7 +46,7 @@ field5 ["your value"]
46
46
 
47
47
  # field_desc6
48
48
  # args6 allow only Hash
49
- field6 {"your key"=>"your value"}
49
+ field6 "your key"=>"your value"
50
50
 
51
51
  # field_desc7
52
52
  # args7 is required
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dslable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-29 00:00:00.000000000 Z
12
+ date: 2014-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &22865736 !ruby/object:Gem::Requirement
16
+ requirement: &29428980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.18.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *22865736
24
+ version_requirements: *29428980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &22865052 !ruby/object:Gem::Requirement
27
+ requirement: &29426820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 4.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *22865052
35
+ version_requirements: *29426820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec_piccolo
38
- requirement: &22864596 !ruby/object:Gem::Requirement
38
+ requirement: &29440908 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.0.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *22864596
46
+ version_requirements: *29440908
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &22864068 !ruby/object:Gem::Requirement
49
+ requirement: &29437380 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.3'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *22864068
57
+ version_requirements: *29437380
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &22863636 !ruby/object:Gem::Requirement
60
+ requirement: &29435688 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 2.14.1
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *22863636
68
+ version_requirements: *29435688
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &22863360 !ruby/object:Gem::Requirement
71
+ requirement: &29435124 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *22863360
79
+ version_requirements: *29435124
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: simplecov
82
- requirement: &22862964 !ruby/object:Gem::Requirement
82
+ requirement: &29434440 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: 0.8.2
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *22862964
90
+ version_requirements: *29434440
91
91
  description: Dslable is generator for simple gem-code template.
92
92
  email:
93
93
  - tbpgr@tbpgr.jp