roger 1.1.3 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +2 -0
  3. data/.rubocop.yml +47 -0
  4. data/.travis.yml +1 -5
  5. data/CHANGELOG.md +8 -0
  6. data/Gemfile +3 -3
  7. data/Rakefile +10 -4
  8. data/bin/roger +1 -1
  9. data/doc/mockupfile.md +97 -0
  10. data/doc/templating.md +5 -1
  11. data/examples/default_template/Gemfile +1 -1
  12. data/lib/roger/cli.rb +41 -36
  13. data/lib/roger/cli/command.rb +2 -4
  14. data/lib/roger/cli/generate.rb +1 -0
  15. data/lib/roger/cli/release.rb +2 -2
  16. data/lib/roger/cli/serve.rb +11 -11
  17. data/lib/roger/cli/test.rb +6 -5
  18. data/lib/roger/extractor.rb +42 -43
  19. data/lib/roger/generators.rb +27 -19
  20. data/lib/roger/generators/generator.rb +7 -10
  21. data/lib/roger/generators/new.rb +56 -41
  22. data/lib/roger/generators/templates/generator.tt +5 -5
  23. data/lib/roger/helpers/get_callable.rb +15 -14
  24. data/lib/roger/helpers/logging.rb +35 -13
  25. data/lib/roger/mockupfile.rb +13 -23
  26. data/lib/roger/project.rb +41 -34
  27. data/lib/roger/rack/roger.rb +28 -29
  28. data/lib/roger/rack/sleep.rb +4 -5
  29. data/lib/roger/release.rb +95 -72
  30. data/lib/roger/release/cleaner.rb +14 -13
  31. data/lib/roger/release/finalizers.rb +10 -10
  32. data/lib/roger/release/finalizers/dir.rb +17 -19
  33. data/lib/roger/release/finalizers/git_branch.rb +76 -38
  34. data/lib/roger/release/finalizers/rsync.rb +60 -49
  35. data/lib/roger/release/finalizers/zip.rb +32 -29
  36. data/lib/roger/release/injector.rb +43 -37
  37. data/lib/roger/release/processors.rb +24 -22
  38. data/lib/roger/release/processors/mockup.rb +97 -69
  39. data/lib/roger/release/processors/url_relativizer.rb +57 -30
  40. data/lib/roger/release/scm.rb +30 -27
  41. data/lib/roger/release/scm/git.rb +101 -92
  42. data/lib/roger/resolver.rb +86 -61
  43. data/lib/roger/server.rb +52 -27
  44. data/lib/roger/template.rb +102 -74
  45. data/lib/roger/test.rb +16 -13
  46. data/lib/roger/version.rb +3 -2
  47. data/roger.gemspec +9 -5
  48. data/test/helpers/cli.rb +17 -15
  49. data/test/project/Gemfile +2 -2
  50. data/test/project/html/formats/csv.rcsv +0 -0
  51. data/test/project/lib/generators/test.rb +2 -3
  52. data/test/project/lib/tests/fail/fail.rb +5 -6
  53. data/test/project/lib/tests/noop/lib/cli.rb +2 -1
  54. data/test/project/lib/tests/noop/lib/test.rb +5 -5
  55. data/test/project/lib/tests/noop/noop.rb +2 -1
  56. data/test/project/lib/tests/succeed/succeed.rb +5 -6
  57. data/test/unit/cli/cli_base_test.rb +2 -3
  58. data/test/unit/cli/cli_generate_test.rb +9 -10
  59. data/test/unit/cli/cli_serve_test.rb +22 -18
  60. data/test/unit/cli/cli_test_test.rb +13 -15
  61. data/test/unit/cli/cli_version_test.rb +4 -4
  62. data/test/unit/generators_test.rb +8 -10
  63. data/test/unit/helpers/logging_test.rb +64 -0
  64. data/test/unit/rack/roger_test.rb +21 -0
  65. data/test/unit/release/cleaner_test.rb +23 -19
  66. data/test/unit/release/finalizers/git_branch_test.rb +2 -1
  67. data/test/unit/release/finalizers/zip_test.rb +48 -0
  68. data/test/unit/release/mockup_test.rb +48 -0
  69. data/test/unit/release/processors_test.rb +19 -19
  70. data/test/unit/release_test.rb +15 -14
  71. data/test/unit/resolver_test.rb +21 -14
  72. data/test/unit/server_test.rb +31 -0
  73. data/test/unit/template_test.rb +58 -36
  74. data/test/unit/test_test.rb +3 -2
  75. metadata +35 -9
  76. data/test/Mockupfile-syntax.rb +0 -93
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-10 00:00:00.000000000 Z
13
+ date: 2015-06-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -72,16 +72,16 @@ dependencies:
72
72
  name: hpricot
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - '>='
75
+ - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.6.4
77
+ version: 0.8.4
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - '>='
82
+ - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.6.4
84
+ version: 0.8.4
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: redcarpet
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,21 @@ dependencies:
138
138
  - - ~>
139
139
  - !ruby/object:Gem::Version
140
140
  version: 2.10.0
141
- description:
141
+ - !ruby/object:Gem::Dependency
142
+ name: rubocop
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ~>
146
+ - !ruby/object:Gem::Version
147
+ version: 0.31.0
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ~>
153
+ - !ruby/object:Gem::Version
154
+ version: 0.31.0
155
+ description: See homepage for more information.
142
156
  email:
143
157
  - info@digitpaint.nl
144
158
  - flurin@digitpaint.nl
@@ -149,6 +163,8 @@ extra_rdoc_files:
149
163
  - README.md
150
164
  files:
151
165
  - .gitignore
166
+ - .hound.yml
167
+ - .rubocop.yml
152
168
  - .travis.yml
153
169
  - CHANGELOG.md
154
170
  - Gemfile
@@ -206,12 +222,12 @@ files:
206
222
  - lib/roger/test.rb
207
223
  - lib/roger/version.rb
208
224
  - roger.gemspec
209
- - test/Mockupfile-syntax.rb
210
225
  - test/helpers/cli.rb
211
226
  - test/project/.rvmrc
212
227
  - test/project/Gemfile
213
228
  - test/project/Gemfile.lock
214
229
  - test/project/Mockupfile
230
+ - test/project/html/formats/csv.rcsv
215
231
  - test/project/html/formats/erb.html.erb
216
232
  - test/project/html/formats/index.html
217
233
  - test/project/html/formats/json.json.erb
@@ -248,11 +264,16 @@ files:
248
264
  - test/unit/cli/cli_test_test.rb
249
265
  - test/unit/cli/cli_version_test.rb
250
266
  - test/unit/generators_test.rb
267
+ - test/unit/helpers/logging_test.rb
268
+ - test/unit/rack/roger_test.rb
251
269
  - test/unit/release/cleaner_test.rb
252
270
  - test/unit/release/finalizers/git_branch_test.rb
271
+ - test/unit/release/finalizers/zip_test.rb
272
+ - test/unit/release/mockup_test.rb
253
273
  - test/unit/release/processors_test.rb
254
274
  - test/unit/release_test.rb
255
275
  - test/unit/resolver_test.rb
276
+ - test/unit/server_test.rb
256
277
  - test/unit/template_test.rb
257
278
  - test/unit/test_test.rb
258
279
  homepage: http://github.com/digitpaint/roger
@@ -281,12 +302,12 @@ signing_key:
281
302
  specification_version: 4
282
303
  summary: Roger is a set of tools to create self-containing HTML mockups.
283
304
  test_files:
284
- - test/Mockupfile-syntax.rb
285
305
  - test/helpers/cli.rb
286
306
  - test/project/.rvmrc
287
307
  - test/project/Gemfile
288
308
  - test/project/Gemfile.lock
289
309
  - test/project/Mockupfile
310
+ - test/project/html/formats/csv.rcsv
290
311
  - test/project/html/formats/erb.html.erb
291
312
  - test/project/html/formats/index.html
292
313
  - test/project/html/formats/json.json.erb
@@ -323,10 +344,15 @@ test_files:
323
344
  - test/unit/cli/cli_test_test.rb
324
345
  - test/unit/cli/cli_version_test.rb
325
346
  - test/unit/generators_test.rb
347
+ - test/unit/helpers/logging_test.rb
348
+ - test/unit/rack/roger_test.rb
326
349
  - test/unit/release/cleaner_test.rb
327
350
  - test/unit/release/finalizers/git_branch_test.rb
351
+ - test/unit/release/finalizers/zip_test.rb
352
+ - test/unit/release/mockup_test.rb
328
353
  - test/unit/release/processors_test.rb
329
354
  - test/unit/release_test.rb
330
355
  - test/unit/resolver_test.rb
356
+ - test/unit/server_test.rb
331
357
  - test/unit/template_test.rb
332
358
  - test/unit/test_test.rb
@@ -1,93 +0,0 @@
1
- # Example for a Mockupfile, a lot of this has to have a sensible default.
2
-
3
- Sass::Plugin.options[:style] = :expanded
4
- Sass::Plugin.options[:template_location] = "./html/stylesheets"
5
- Sass::Plugin.options[:css_location] = "./html/stylesheets"
6
-
7
- # Set verbosity to true
8
- mockup.project.options[:verbose] = true
9
-
10
- # These are defaults, but can be set here
11
- mockup.project.html_path = mockup.project.path + "html"
12
- mockup.project.partial_path = mockup.project.path + "partials"
13
-
14
- mockup.serve do |server|
15
- server.use :sass
16
- end
17
-
18
- mockup.test do |t|
19
- t.use :jshint
20
- end
21
-
22
- mockup.release do |release|
23
-
24
- release.target_path # The target path where releases are put
25
- release.build_path # The path where the release gets built
26
- release.source_path # The source for this mockup
27
-
28
- # Extract mockup
29
- # Pass custom config to the extractor, this is optional
30
- # release.extract :url_attributes => %w{src href action data-main}
31
-
32
- # Get git version
33
- release.scm.previous # Get the previous version SCM op (looks for tags)
34
- release.scm.version # Get the git version
35
- release.scm.date # Get the git date
36
-
37
- # Create custom banner
38
- #
39
- # The default banner looks like this:
40
- #
41
- # =======================
42
- # = Version : v1.0.0 =
43
- # = Date : 2012-06-20 =
44
- # =======================
45
- release.banner do
46
- "bla bla bla"
47
- end
48
-
49
-
50
- # Sassify CSS (this are the defaults too), all options except form :match and :skip are passed to Sass.compile_file
51
- # release.use :sass, :match => ["stylesheets/**/*.scss"], :skip => [/_.*\.scss\Z/], :style => :expanded
52
- # The previous statement is the same as:
53
- release.use :sass
54
-
55
- # Run requirejs optimizer
56
- # release.use :requirejs, {
57
- # :build_files => {"javascripts/site.build.js" => "javascripts"},
58
- # :rjs => release.source_path + "../vendor/requirejs/r.js",
59
- # :node => "node"
60
- # }
61
- release.use :requirejs
62
-
63
- # Minify, will not minify anything above the :delimiter
64
- # release.use :yuicompressor, {
65
- # :match => ["**/*.{css,js}"],
66
- # :skip => [/javascripts\/vendor\/.*\.js\Z/, /_doc\/.*/],
67
- # :delimiter => Regexp.escape("/* -------------------------------------------------------------------------------- */")
68
- # }
69
- # The previous statement is the same as:
70
- release.use :yuicompressor
71
-
72
-
73
- # Inject VERSION / DATE (i.e. in TOC)
74
- r.inject({"[VERSION]" => release.scm.version, "[DATE]" => release.scm.date.strftime("%Y-%m-%d")}, :into => %w{_doc/toc.html})
75
-
76
- # Inject Banners on everything matching the regexp in all .css files
77
- # The banner will be commented as CSS.
78
- release.inject({ /\/\*\s*\[BANNER\]\s*\*\// => r.banner(:comment => :css)}, :into => %w{**/*.css})
79
-
80
- # Inject CHANGELOG
81
- release.inject({"[CHANGELOG]" => {:file => "../CHANGELOG", :processor => 'md'}}, :into => %w{_doc/changelog.html})
82
-
83
- # Inject NOTES
84
- release.inject({"[NOTES]" => {:file => "../NOTES.md", :processor => 'md'}}, :into => %w{_doc/notes.html})
85
-
86
- # Cleanup on the build
87
- release.cleanup "**/.DS_Store"
88
-
89
- # Finalize the release
90
- # This is the default finalizer so not required
91
- # release.finalize :dir
92
-
93
- end