slippery 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- Yzk3NmU1ZGE3ZjY2MzM1OTRkOWQ3NDRlYzI0ZDkwOGEzOTYxMTgyOA==
5
- data.tar.gz: !binary |-
6
- MDI2MjA1M2FjN2Y4ZmY3Y2U1MDY2YWYzMTQ2NTFmZTU0NzZmMTE2MQ==
2
+ SHA1:
3
+ metadata.gz: 8f80fda0bae62ca067435e834e419d92aa8afe0a
4
+ data.tar.gz: 142867e88db162cc4df8bedacca3fdaee9a8e84d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZWFiMmQ4MmJmNTI0OThkNjkwMjNiMWE5NDJhNDIyNGI2ZGU0ZTlkM2I2NThl
10
- NDUyYzM1NDNkOWMzMmRkNmU5ZmVkOWY3ZThlOWY4ZTNmNGY0ZGQyN2M3ZmZk
11
- ZDdhNzE2MjZlZTg3ZmYyMmU3NzVjZDkwYTVjYjQ4NzJmZmYzNDQ=
12
- data.tar.gz: !binary |-
13
- YTYxMjg0YWEwNzFhN2ZkZTQxMDU5MmVjNzc1N2Q3MTIxZjQ4YThlMmE0NDI1
14
- YzA5NDBiMjM5ZjJhMzQxYTJhYTU1YjI1ZTUxODM5MWU1MTVlMTgwODkzYjU1
15
- ODZhZjlkZGRmNWY4MWRjMzIyNjcwYjRlYmIxYjMxZDkyY2E3NTE=
6
+ metadata.gz: 87cd334648baa6b950f6444bc4b97d37762f475c0a90f75bc3e046c307bf53cef62bf4f77226f20fd064776819dfa4bc564791d27022fdbfea21b99a0253eb4b
7
+ data.tar.gz: 441939de5557f7de808772ccd8e2a1dfd5c4e75c3e2deade95dee4c205276de6f1adcbb234a789a05b0d6fc791d8467ece9605b417d962bb19eb4f8f107ea11a
@@ -0,0 +1,2 @@
1
+ .bundle
2
+ pkg
@@ -1,27 +1,13 @@
1
1
  language: ruby
2
- before_install: gem install bundler
3
- bundler_args: --without yard guard benchmarks
4
- script: "bundle exec rake ci:metrics"
5
2
  rvm:
6
- - 1.9.2
7
3
  - 1.9.3
8
4
  - 2.0.0
5
+ - 2.1.0
9
6
  - jruby-19mode
10
- - jruby-head
7
+ - rbx
11
8
  - ruby-head
12
- - rbx-19mode
9
+ - jruby-head
13
10
  matrix:
14
- include:
15
- - rvm: jruby-19mode
16
- env: JRUBY_OPTS="$JRUBY_OPTS --debug"
17
- - rvm: jruby-head
18
- env: JRUBY_OPTS="$JRUBY_OPTS --debug"
19
11
  allow_failures:
20
12
  - rvm: ruby-head
21
- - rvm: rbx-19mode
22
- notifications:
23
- email:
24
- recipients:
25
- - arne@arnebrasseur.net
26
- on_success: never
27
- on_failure: change
13
+ - rvm: jruby-head
data/Gemfile CHANGED
@@ -1,10 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- group :development do
4
- gem 'devtools', github: 'rom-rb/devtools'
5
- eval File.read('Gemfile.devtools')
6
- end
7
-
8
- #gem 'hexp', path: '/home/arne/github/hexp'
3
+ # group :development do
4
+ # gem 'devtools', github: 'rom-rb/devtools'
5
+ # eval File.read('Gemfile.devtools')
6
+ # end
9
7
 
10
8
  gemspec
@@ -1,219 +1,105 @@
1
- GIT
2
- remote: git://github.com/rom-rb/devtools.git
3
- revision: bca222ee252d4d4bd86f55967704965711e90096
4
- specs:
5
- devtools (0.0.2)
6
- ice_nine (~> 0.9.0)
7
-
8
- GIT
9
- remote: https://github.com/bbatsov/rubocop.git
10
- revision: e9fa7563d4ea6c0abb7ed58e1bdb81ebe5138c5f
11
- specs:
12
- rubocop (0.10.0)
13
- backports (~> 3.3.3)
14
- parser (= 2.0.0.pre2)
15
- powerpack (= 0.0.1)
16
- rainbow (>= 1.1.4)
17
-
18
- GIT
19
- remote: https://github.com/troessner/reek.git
20
- revision: ae4d09078ae29bc6cbced4bb41b8642733d8ffc4
21
- specs:
22
- reek (1.3.1)
23
- ruby2ruby (~> 2.0.2)
24
- ruby_parser (~> 3.1.1)
25
- sexp_processor
26
-
27
1
  PATH
28
2
  remote: .
29
3
  specs:
30
- slippery (0.1.0)
31
- hexp (~> 0.0)
4
+ slippery (0.2.0)
5
+ asset_packer (~> 0.1.0)
6
+ concord (~> 0.1.4)
7
+ hexp (~> 0.3.3)
32
8
  kramdown (~> 1.1)
33
9
  rake (~> 10.1)
34
- rb-inotify
10
+ rb-inotify (~> 0.9.3)
35
11
 
36
12
  GEM
37
13
  remote: https://rubygems.org/
38
14
  specs:
39
- abstract_type (0.0.6)
40
- adamantium (0.0.11)
41
- ice_nine (~> 0.9.0)
42
- anima (0.0.6)
43
- abstract_type (~> 0.0.4)
44
- adamantium (~> 0.0.6)
45
- backports (~> 3.0, >= 3.0.3)
46
- equalizer (~> 0.0.4)
15
+ abstract_type (0.0.7)
16
+ adamantium (0.2.0)
17
+ ice_nine (~> 0.11.0)
18
+ memoizable (~> 0.4.0)
19
+ anima (0.2.0)
20
+ abstract_type (~> 0.0.7)
21
+ adamantium (~> 0.1)
22
+ equalizer (~> 0.0.8)
23
+ asset_packer (0.1.0)
24
+ hexp (~> 0.3.3)
25
+ mime-types (~> 2.2)
47
26
  ast (1.1.0)
48
- backports (3.3.3)
49
- coderay (1.0.9)
50
- colorize (0.5.8)
51
- concord (0.1.2)
52
- adamantium (~> 0.0.10)
53
- equalizer (~> 0.0.5)
54
- coveralls (0.6.7)
55
- colorize
56
- multi_json (~> 1.3)
57
- rest-client
58
- simplecov (>= 0.7)
59
- thor
60
- descendants_tracker (0.0.1)
61
- diff-lcs (1.2.4)
62
- equalizer (0.0.5)
63
- adamantium (~> 0.0.6)
64
- backports (~> 3.0, >= 3.0.3)
65
- ffi (1.9.0)
66
- ffi-hunspell (0.3.0)
67
- ffi (~> 1.0)
68
- flay (2.3.1)
69
- ruby_parser (~> 3.0)
70
- sexp_processor (~> 4.0)
71
- flog (4.1.1)
72
- ruby_parser (~> 3.1, > 3.1.0)
73
- sexp_processor (~> 4.0)
74
- formatador (0.2.4)
75
- guard (1.8.1)
76
- formatador (>= 0.2.4)
77
- listen (>= 1.0.0)
78
- lumberjack (>= 1.0.2)
79
- pry (>= 0.9.10)
80
- thor (>= 0.14.6)
81
- guard-bundler (1.0.0)
82
- bundler (~> 1.0)
83
- guard (~> 1.1)
84
- guard-mutant (0.0.1)
85
- guard (~> 1.8)
86
- inflecto (~> 0.0.2)
87
- mutant (~> 0.3.0.beta15)
88
- guard-rspec (3.0.2)
89
- guard (>= 1.8)
90
- rspec (~> 2.13)
91
- guard-rubocop (0.2.0)
92
- guard (~> 1.8)
93
- rubocop (~> 0.9)
94
- hexp (0.3.1)
27
+ concord (0.1.4)
28
+ adamantium (~> 0.1)
29
+ equalizer (~> 0.0.7)
30
+ diff-lcs (1.2.5)
31
+ equalizer (0.0.9)
32
+ ffi (1.9.3)
33
+ hexp (0.3.3)
95
34
  equalizer (~> 0.0)
96
35
  ice_nine (~> 0.9)
97
36
  nokogiri (~> 1.6)
98
- sass (~> 3.2)
99
- ice_nine (0.9.0)
37
+ sass (~> 3.2.19)
38
+ ice_nine (0.11.0)
100
39
  inflecto (0.0.2)
101
- kramdown (1.1.0)
102
- libnotify (0.8.1)
103
- ffi (>= 1.0.11)
104
- listen (1.2.2)
105
- rb-fsevent (>= 0.9.3)
106
- rb-inotify (>= 0.9)
107
- rb-kqueue (>= 0.2)
108
- lumberjack (1.0.4)
109
- method_source (0.8.1)
110
- mime-types (1.23)
111
- mini_portile (0.5.2)
112
- multi_json (1.7.7)
113
- mutant (0.3.0.beta18)
114
- adamantium (~> 0.0.10)
115
- anima (~> 0.0.6)
116
- concord (~> 0.1.1)
117
- descendants_tracker (~> 0.0.1)
118
- equalizer (~> 0.0.5)
119
- ice_nine (~> 0.9.0)
40
+ kramdown (1.3.3)
41
+ memoizable (0.4.2)
42
+ thread_safe (~> 0.3, >= 0.3.1)
43
+ mime-types (2.2)
44
+ mini_portile (0.5.3)
45
+ morpher (0.2.2)
46
+ abstract_type (~> 0.0.7)
47
+ adamantium (~> 0.2.0)
48
+ anima (~> 0.2.0)
49
+ ast (~> 1.1.0)
50
+ concord (~> 0.1.4)
51
+ equalizer (~> 0.0.9)
52
+ ice_nine (~> 0.11.0)
53
+ procto (~> 0.0.2)
54
+ mutant (0.5.10)
55
+ abstract_type (~> 0.0.7)
56
+ adamantium (~> 0.2.0)
57
+ anima (~> 0.2.0)
58
+ concord (~> 0.1.4)
59
+ diff-lcs (~> 1.2)
60
+ equalizer (~> 0.0.9)
61
+ ice_nine (~> 0.11.0)
120
62
  inflecto (~> 0.0.2)
121
- parser (~> 2.0.0.pre2)
122
- rspec (~> 2.14.1)
123
- unparser (~> 0.0.8)
63
+ memoizable (~> 0.4.2)
64
+ morpher (~> 0.2.1)
65
+ parser (~> 2.1)
66
+ procto (~> 0.0.2)
67
+ unparser (~> 0.1.10)
68
+ mutant-rspec (0.5.3)
69
+ mutant (~> 0.5.3)
70
+ rspec-core (>= 2.14.1, <= 3.0.0.beta2)
124
71
  nokogiri (1.6.1)
125
72
  mini_portile (~> 0.5.0)
126
- parser (2.0.0.pre2)
73
+ parser (2.1.8)
127
74
  ast (~> 1.1)
128
75
  slop (~> 3.4, >= 3.4.5)
129
- pelusa (0.2.2)
130
- powerpack (0.0.1)
131
- pry (0.9.12.2)
132
- coderay (~> 1.0.5)
133
- method_source (~> 0.8)
134
- slop (~> 3.4)
135
- rainbow (1.1.4)
136
- rake (10.1.0)
137
- rb-fchange (0.0.6)
138
- ffi
139
- rb-fsevent (0.9.3)
140
- rb-inotify (0.9.0)
141
- ffi (>= 0.5.0)
142
- rb-kqueue (0.2.0)
76
+ procto (0.0.2)
77
+ rake (10.3.1)
78
+ rb-inotify (0.9.3)
143
79
  ffi (>= 0.5.0)
144
- rb-notifu (0.0.4)
145
- rbench (0.2.3)
146
- rest-client (1.6.7)
147
- mime-types (>= 1.16)
148
80
  rspec (2.14.1)
149
81
  rspec-core (~> 2.14.0)
150
82
  rspec-expectations (~> 2.14.0)
151
83
  rspec-mocks (~> 2.14.0)
152
- rspec-core (2.14.3)
153
- rspec-expectations (2.14.0)
84
+ rspec-core (2.14.8)
85
+ rspec-expectations (2.14.5)
154
86
  diff-lcs (>= 1.1.3, < 2.0)
155
- rspec-mocks (2.14.1)
156
- ruby2ruby (2.0.6)
157
- ruby_parser (~> 3.1)
158
- sexp_processor (~> 4.0)
159
- ruby_parser (3.1.3)
160
- sexp_processor (~> 4.1)
161
- rubygems-tasks (0.2.4)
162
- sass (3.2.14)
163
- sexp_processor (4.2.1)
164
- simplecov (0.7.1)
165
- multi_json (~> 1.0)
166
- simplecov-html (~> 0.7.1)
167
- simplecov-html (0.7.1)
168
- slop (3.4.5)
169
- terminal-notifier-guard (1.5.3)
170
- thor (0.18.1)
171
- unparser (0.0.8)
172
- abstract_type (~> 0.0.5)
173
- adamantium (~> 0.0.7)
174
- concord (~> 0.1.0)
175
- equalizer (~> 0.0.5)
176
- parser (~> 2.0.0.pre1)
177
- yard (0.8.6.2)
178
- yard-spellcheck (0.1.5)
179
- ffi-hunspell (~> 0.2)
180
- yard (~> 0.6)
181
- yardstick (0.9.6)
182
- backports (~> 3.3, >= 3.3.0)
183
- yard (~> 0.8, >= 0.8.6)
87
+ rspec-mocks (2.14.6)
88
+ sass (3.2.19)
89
+ slop (3.5.0)
90
+ thread_safe (0.3.3)
91
+ unparser (0.1.12)
92
+ abstract_type (~> 0.0.7)
93
+ adamantium (~> 0.2.0)
94
+ concord (~> 0.1.4)
95
+ equalizer (~> 0.0.9)
96
+ parser (~> 2.1)
97
+ procto (~> 0.0.2)
184
98
 
185
99
  PLATFORMS
186
100
  ruby
187
101
 
188
102
  DEPENDENCIES
189
- coveralls (~> 0.6.7)
190
- devtools!
191
- flay (~> 2.3.1)
192
- flog (~> 4.1.1)
193
- guard (~> 1.8.1)
194
- guard-bundler (~> 1.0.0)
195
- guard-mutant (~> 0.0.1)
196
- guard-rspec (~> 3.0.2)
197
- guard-rubocop (~> 0.2.0)
198
- jruby-openssl (~> 0.8.5)
199
- kramdown (~> 1.1.0)
200
- libnotify (~> 0.8.0)
201
- listen (~> 1.2.2)
202
- mutant (~> 0.3.0.beta18)
203
- pelusa (~> 0.2.2)
204
- rake (~> 10.1.0)
205
- rb-fchange (~> 0.0.6)
206
- rb-fsevent (~> 0.9.3)
207
- rb-inotify (~> 0.9.0)
208
- rb-notifu (~> 0.0.4)
209
- rbench (~> 0.2.3)
210
- reek (~> 1.3.1)!
211
- rspec (~> 2.14.1)
212
- rubocop (~> 0.10.0)!
213
- rubygems-tasks
214
- simplecov (~> 0.7.1)
103
+ mutant-rspec (~> 0.5.3)
104
+ rspec (~> 2.14)
215
105
  slippery!
216
- terminal-notifier-guard (~> 1.5.3)
217
- yard (~> 0.8.6.2)
218
- yard-spellcheck (~> 0.1.5)
219
- yardstick (~> 0.9.6)
data/README.md CHANGED
@@ -54,6 +54,8 @@ Slippery::RakeTasks.new do |s|
54
54
  s.processor 'head' do |head|
55
55
  head <<= H[:title, 'Web Services, Past Present Future']
56
56
  end
57
+
58
+ s.include_assets
57
59
  end
58
60
  ```
59
61
 
@@ -64,17 +66,30 @@ You can also add built-in or custom processors directly
64
66
  ```ruby
65
67
  Slippery::RakeTasks.new do |s|
66
68
  s.processors << Slippery::Processors::GraphvizDot.new('.dot')
67
- s.processors << Slippery::Processors::SelfContained
68
69
  end
69
70
  ```
70
71
 
72
+ The rake task also has a few DSL methods for common use cases
73
+
74
+ ```ruby
75
+ Slippery::RakeTasks.new do |s|
76
+ s.title "Functional Programming in Ruby"
77
+ s.include_assets
78
+ s.add_highlighting
79
+ end
80
+ ```
81
+
82
+ * `title` Configure the title used in the HTML `&lt;title&gt;` tag
83
+ * `include_assets` Download/copy all js/css/images to the `assets` directory, and adjust the URIs in the document accordingly
84
+ * `add_highlighting` Add Highlight.js. Takes the style and version as arguments, e.g. `add_highlighting(:default, '0.8.0')`
85
+
71
86
  ## Processors
72
87
 
73
88
  These are defined in the `Slippery::Processors` namespace.
74
89
 
75
90
  ### GraphvizDot
76
91
 
77
- The "Dot" language is a DSL (domain specific language) for describing graphs. Using the `GraphvizDot` processor, you can turn "dot" fragments into inline SVG graphics.
92
+ The "Dot" language is a DSL (domain specific language) for describing graphs. Using the `GraphvizDot` processor, you can turn "dot" fragments into inline SVG graphics. This requires the `dot` command line utility to be available on your system. Look for a package named `graphviz`.
78
93
 
79
94
  In your presentation :
80
95
 
data/Rakefile CHANGED
@@ -1,5 +1,23 @@
1
- require 'devtools'
2
- Devtools.init_rake_tasks
3
1
 
4
- require 'rubygems/tasks'
5
- Gem::Tasks.new
2
+ require 'rspec/core/rake_task'
3
+ require 'mutant'
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ task :default => :spec
8
+
9
+ task :mutant do
10
+ Mutant::CLI.run(%w[-Ilib -rslippery --use rspec Slippery*])
11
+ end
12
+
13
+ require 'rubygems/package_task'
14
+ spec = Gem::Specification.load(File.expand_path('../slippery.gemspec', __FILE__))
15
+ gem = Gem::PackageTask.new(spec)
16
+ gem.define
17
+
18
+ desc "Push gem to rubygems.org"
19
+ task :push => :gem do
20
+ sh "git tag v#{Slippery::VERSION}"
21
+ sh "git push --tags"
22
+ sh "gem push pkg/slippery-#{Slippery::VERSION}.gem"
23
+ end
@@ -1,6 +1,12 @@
1
+ require 'base64'
2
+ require 'pathname'
3
+ require 'open-uri'
4
+ require 'forwardable'
5
+
1
6
  require 'kramdown'
2
7
  require 'hexp'
3
- require 'pathname'
8
+ require 'concord'
9
+ require 'asset_packer'
4
10
 
5
11
  # Slippery namespace module
6
12
  module Slippery
@@ -11,26 +17,9 @@ module Slippery
11
17
  end
12
18
  end
13
19
 
14
- # Core extension
15
- class Class
16
- unless defined?(private_attr_accessor)
17
- # Like attr_accessor, but only available inside the class
18
- #
19
- # @param args [Array<Symbol>] The attributes to define
20
- # @api private
21
- #
22
- def private_attr_accessor(*args)
23
- attr_accessor(*args)
24
- private(*args)
25
- private(*args.map {|method| "#{method}=".intern })
26
- end
27
- end
28
- end
29
-
30
20
  require 'slippery/version'
31
21
  require 'slippery/converter'
32
22
  require 'slippery/document'
33
- require 'slippery/assets'
34
23
  require 'slippery/presentation'
35
24
 
36
25
  require 'slippery/processor_helpers'
@@ -38,7 +27,6 @@ require 'slippery/processor_helpers'
38
27
  require 'slippery/processors/add_google_font'
39
28
  require 'slippery/processors/graphviz_dot'
40
29
  require 'slippery/processors/hr_to_sections'
41
- require 'slippery/processors/self_contained'
42
30
  require 'slippery/processors/add_highlight'
43
31
 
44
32
  require 'slippery/processors/impress_js/add_impress_js'