daddy 0.0.22 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,8 @@ module Daddy
5
5
  module Diff
6
6
 
7
7
  def git_diff(file, options = {})
8
+ options[:as] ||= 'edit'
9
+
8
10
  git = Daddy::Git.new
9
11
  a = File.read(file).gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;')
10
12
  b = git.show_previous(file, true).gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;')
@@ -19,12 +21,12 @@ module Daddy
19
21
  puts '<pre>' + git.git_diff_name(*includes) + '</pre>'
20
22
  end
21
23
 
22
- def diff(file_a, file_b)
24
+ def diff(file_a, file_b, options = {})
23
25
  a = File.read(file_a)
24
26
  b = File.read(file_b)
25
27
  diff = format_diff(Differ.diff(a, b))
26
28
 
27
- puts file_a
29
+ show_filename(file_a, options)
28
30
  puts "<pre>#{diff}</pre>"
29
31
  end
30
32
 
@@ -38,6 +40,10 @@ module Daddy
38
40
  def show_filename(filename, options = {})
39
41
  if options[:as] == 'new'
40
42
  puts "<span class=\"new\">[新規作成] #{filename}</span>"
43
+ elsif options[:as] == 'auto'
44
+ puts "<span class=\"auto\">[自動生成] #{filename}</span>"
45
+ elsif options[:as] == 'edit'
46
+ puts "<span class=\"edit\">[編集] #{filename}</span>"
41
47
  else
42
48
  puts filename
43
49
  end
@@ -120,6 +120,16 @@ span.new {
120
120
  font-weight: bold;
121
121
  }
122
122
 
123
+ span.edit {
124
+ color: #006400;
125
+ font-weight: bold;
126
+ }
127
+
128
+ span.auto {
129
+ color: #006400;
130
+ font-weight: bold;
131
+ }
132
+
123
133
  ins.differ {
124
134
  text-decoration: none;
125
135
  background: #90EE90;
data/lib/tasks/dad.rake CHANGED
@@ -5,3 +5,9 @@ require 'rake'
5
5
  task :dad do
6
6
  system('rake -T | grep dad:')
7
7
  end
8
+
9
+ namespace :dad do
10
+ task :install do
11
+ system('rake dad:cucumber:install')
12
+ end
13
+ end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - ichy
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-05-05 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: capybara
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: capybara-webkit
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - '='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - '='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: cucumber
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: cucumber-rails
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: ci_reporter
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: differ
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: poltergeist
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ! '>='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ! '>='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: rails
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: rails-i18n
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ! '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ! '>='
137
156
  - !ruby/object:Gem::Version
@@ -139,6 +158,7 @@ dependencies:
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: simplecov
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
163
  - - ! '>='
144
164
  - !ruby/object:Gem::Version
@@ -146,6 +166,7 @@ dependencies:
146
166
  type: :runtime
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
171
  - - ! '>='
151
172
  - !ruby/object:Gem::Version
@@ -153,6 +174,7 @@ dependencies:
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: simplecov-rcov
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
179
  - - ! '>='
158
180
  - !ruby/object:Gem::Version
@@ -160,6 +182,7 @@ dependencies:
160
182
  type: :runtime
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
187
  - - ! '>='
165
188
  - !ruby/object:Gem::Version
@@ -171,70 +194,71 @@ executables: []
171
194
  extensions: []
172
195
  extra_rdoc_files: []
173
196
  files:
174
- - lib/daddy.rb
175
- - lib/daddy/cucumber.rb
176
- - lib/daddy/cucumber/pause.rb
177
- - lib/daddy/cucumber/capture.rb
197
+ - lib/tasks/dad.rake
198
+ - lib/tasks/db_config.rake
199
+ - lib/tasks/unicorn.erb
200
+ - lib/tasks/jenkins
201
+ - lib/tasks/nginx.rake
202
+ - lib/tasks/cucumber.rake
203
+ - lib/tasks/jenkins.conf
204
+ - lib/tasks/unicorn.rb
205
+ - lib/tasks/cucumber_install.rake
206
+ - lib/tasks/database.yml.erb
207
+ - lib/tasks/nginx.repo
208
+ - lib/tasks/phantomjs.rake
209
+ - lib/tasks/test.rake
210
+ - lib/tasks/nginx.conf.erb
211
+ - lib/tasks/db_create.rake
212
+ - lib/tasks/jenkins_install.sh
213
+ - lib/tasks/publish.rake
214
+ - lib/tasks/jenkins.rake
215
+ - lib/tasks/cucumber_steps.rake
216
+ - lib/tasks/unicorn.rake
217
+ - lib/tasks/diary.rake
218
+ - lib/daddy/railtie.rb
219
+ - lib/daddy/cucumber/diff.rb
178
220
  - lib/daddy/cucumber/html.rb
179
- - lib/daddy/cucumber/step_definitions/common.rb
221
+ - lib/daddy/cucumber/capture.rb
180
222
  - lib/daddy/cucumber/assert.rb
223
+ - lib/daddy/cucumber/pause.rb
224
+ - lib/daddy/cucumber/step_definitions/common.rb
181
225
  - lib/daddy/cucumber/table.rb
182
- - lib/daddy/cucumber/diff.rb
183
- - lib/daddy/helpers/html_helper.rb
184
- - lib/daddy/capistrano/remote_cache_subdir.rb
185
- - lib/daddy/git.rb
186
- - lib/daddy/model.rb
187
- - lib/daddy/formatter/menu.html.erb
226
+ - lib/daddy/formatter/cucumber.css
188
227
  - lib/daddy/formatter/html.rb
189
- - lib/daddy/formatter/daddy_html.rb
190
228
  - lib/daddy/formatter/daddy.css
191
- - lib/daddy/formatter/cucumber.css
229
+ - lib/daddy/formatter/menu.html.erb
230
+ - lib/daddy/formatter/daddy_html.rb
192
231
  - lib/daddy/formatter/jquery-min.js
193
- - lib/daddy/railtie.rb
194
232
  - lib/daddy/models/acts_as_like.rb
233
+ - lib/daddy/git.rb
234
+ - lib/daddy/capistrano/remote_cache_subdir.rb
235
+ - lib/daddy/helpers/html_helper.rb
195
236
  - lib/daddy/utils/sql_utils.rb
196
- - lib/tasks/jenkins
197
- - lib/tasks/nginx.repo
198
- - lib/tasks/unicorn.rb
199
- - lib/tasks/jenkins.rake
200
- - lib/tasks/dad.rake
201
- - lib/tasks/db_config.rake
202
- - lib/tasks/publish.rake
203
- - lib/tasks/cucumber_steps.rake
204
- - lib/tasks/jenkins_install.sh
205
- - lib/tasks/cucumber.rake
206
- - lib/tasks/nginx.rake
207
- - lib/tasks/jenkins.conf
208
- - lib/tasks/cucumber_install.rake
209
- - lib/tasks/unicorn.rake
210
- - lib/tasks/diary.rake
211
- - lib/tasks/db_create.rake
212
- - lib/tasks/unicorn.erb
213
- - lib/tasks/test.rake
214
- - lib/tasks/phantomjs.rake
215
- - lib/tasks/database.yml.erb
216
- - lib/tasks/nginx.conf.erb
237
+ - lib/daddy/model.rb
238
+ - lib/daddy/cucumber.rb
239
+ - lib/daddy.rb
217
240
  homepage: https://github.com/ichylinux/daddy
218
241
  licenses: []
219
- metadata: {}
220
242
  post_install_message:
221
243
  rdoc_options: []
222
244
  require_paths:
223
245
  - lib
224
246
  required_ruby_version: !ruby/object:Gem::Requirement
247
+ none: false
225
248
  requirements:
226
249
  - - ! '>='
227
250
  - !ruby/object:Gem::Version
228
251
  version: '0'
229
252
  required_rubygems_version: !ruby/object:Gem::Requirement
253
+ none: false
230
254
  requirements:
231
255
  - - ! '>='
232
256
  - !ruby/object:Gem::Version
233
257
  version: '0'
234
258
  requirements: []
235
259
  rubyforge_project:
236
- rubygems_version: 2.0.3
260
+ rubygems_version: 1.8.24
237
261
  signing_key:
238
- specification_version: 4
262
+ specification_version: 3
239
263
  summary: My rails dad
240
264
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDk2Mjg3NzBlMzkzN2U4ZDI5OTNhOWE5MzU1YTI4NDM3YjYxMmJiNQ==
5
- data.tar.gz: !binary |-
6
- ZmI0N2RjMTgxZjNiYmZmMjYwMDFhNGI4MTFhY2VlOGMwNDA3ZWVlMQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MWZmODNhMWVlODE3MDhhYTY0OTc3MTIxNmM3YzcxOWRlY2YyMDdhN2IzMzZh
10
- NTk5MjkzYzExNzU5MjA4OWMwZDg0NWVmOWE1MGJmNzY3OTQ4MWQ1YjNjNmFm
11
- ZDc2MWMxMDIzODg1ZGEwNjY3ODFkYWY4Y2Y1NDRlMTJhYjUxNjI=
12
- data.tar.gz: !binary |-
13
- ZWRkYmExNDc3ZDlkNWY1YjNlZjljYjgzYjQ3NTIzYTdjODI2NzZkZDJmOGNj
14
- MzgyYjAzNmVlNmY1OTMyZDZhYzRkMjk1ZjM5YTVmNGMzOTI1YTEzYWE3NTM2
15
- NGE3ODMyMWIwOGFlYTBjY2RkZjZjZjYzNDMxZmNjOTM5YzgwNTc=