rails_view 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +8 -8
  2. data/Rakefile +103 -173
  3. data/lib/rails_view.rb +47 -44
  4. data/rails_view.gemspec +5 -3
  5. metadata +5 -4
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjNjMmFjYTUxYjUyNTg0MmJkNWEyMGMwZGUyYzc5NTVmYmFmNTZmMw==
4
+ ODlkZmQ4NWRiMzFjZWQ0MGEyODEyZjNkZTlhMGIzODUzOWNjZTZmZA==
5
5
  data.tar.gz: !binary |-
6
- MDVhNWY4OGQ5NmIyMThkNzJmMGY5MGIxOGY4NmFiNTZlODY2YmRmNw==
6
+ NDg1MjA3ZjhiNTEwYTNlZTNiZGMyYzE0ZjhiNzI0ZjM1ZDQ2MmFmYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDY2NjA3Yjg3YjdjYjIzM2U5ZTM5MjJlMDFjZWE1MDliODg5ZjU4NTc0MTky
10
- MWM1ZDZjZDk5M2I3NzUyZWQyZTUwYjc3ZmM4ZGE0ZGRkMTM5MjZmMWYwNDk2
11
- M2NiMWM0ZWMwMTEwYmIxZWU3MTA1YmRkZmY1YmJlMDU0MzY5NzQ=
9
+ MjBhZjljMDBmYjNkNjVlMGY1NmMyNWFkYzcxYTM0NjkwYzNkYTUwYjA5YWFi
10
+ NjNhYjdlZmNjNDg5ZjUxNTI0YjNjNzQ1N2VhNTEwNmU5MzYxZmM4OGQ2MmYz
11
+ MmEzYWI3MzdhNWQ1NzQ3NDg0NDZkZThhNTM1OThlYzEzMjdmMDY=
12
12
  data.tar.gz: !binary |-
13
- MTg2MmMyYWFkNzIwYzQ4NGNlMDJiNzAyMzYzODAzYmY0NjQ2NDlmNGZkZTll
14
- MDllZmJkMDEyM2UzY2VkNGU5NWExYWVhZTI1Mzk1MWZiOGZiN2QxZWZkOWM5
15
- ZjFjYTJjMjJhMDJiODkyMTVhNWYwYzgyNWY0NjJmYTE3YTEwMGE=
13
+ NWMzYjg4NDJkZDZiYTc5MGJhM2FmNTdkODBmZTVhZWJhZWQwN2M4NGQ1MGY1
14
+ ZmJmOGUwY2Y5ODZlYWNkZDZmMDdkZTdjYzNjODg0MmE2OWY1MWQwYmU3ZmY5
15
+ YTBkODY3ZGRjMjkyYjkwZGQzNTE1OGIzNjJhZTE5NmUzYTYyMWQ=
data/Rakefile CHANGED
@@ -1,33 +1,27 @@
1
- This.name =
2
- "View"
3
-
4
- This.synopsis =
5
- "View.render(:template => 'shared/view', :locals => {:key => :val})"
6
-
7
1
  This.rubyforge_project = 'codeforpeople'
8
- This.author = "Ara T. Howard"
9
- This.email = "ara.t.howard@gmail.com"
10
- This.homepage = "https://github.com/ahoward/#{ This.lib }"
11
-
12
- This.setup!
13
-
2
+ This.author = "Ara T. Howard"
3
+ This.email = "ara.t.howard@gmail.com"
4
+ This.homepage = "https://github.com/ahoward/#{ This.lib }"
14
5
 
6
+ task :license do
7
+ open('LICENSE', 'w'){|fd| fd.puts "same as ruby's"}
8
+ end
15
9
 
16
10
  task :default do
17
11
  puts((Rake::Task.tasks.map{|task| task.name.gsub(/::/,':')} - ['default']).sort)
18
12
  end
19
13
 
20
14
  task :test do
21
- This.run_tests!
15
+ run_tests!
22
16
  end
23
17
 
24
18
  namespace :test do
25
- task(:unit){ This.run_tests!(:unit) }
26
- task(:functional){ This.run_tests!(:functional) }
27
- task(:integration){ This.run_tests!(:integration) }
19
+ task(:unit){ run_tests!(:unit) }
20
+ task(:functional){ run_tests!(:functional) }
21
+ task(:integration){ run_tests!(:integration) }
28
22
  end
29
23
 
30
- def This.run_tests!(which = nil)
24
+ def run_tests!(which = nil)
31
25
  which ||= '**'
32
26
  test_dir = File.join(This.dir, "test")
33
27
  test_glob ||= File.join(test_dir, "#{ which }/**_test.rb")
@@ -38,28 +32,28 @@ def This.run_tests!(which = nil)
38
32
 
39
33
  test_rbs.each_with_index do |test_rb, index|
40
34
  testno = index + 1
41
- command = "#{ File.basename(This.ruby) } -I ./lib -I ./test/lib #{ test_rb }"
35
+ command = "#{ This.ruby } -w -I ./lib -I ./test/lib #{ test_rb }"
42
36
 
43
37
  puts
44
- This.say(div, :color => :cyan, :bold => true)
45
- This.say("@#{ testno } => ", :bold => true, :method => :print)
46
- This.say(command, :color => :cyan, :bold => true)
47
- This.say(line, :color => :cyan, :bold => true)
38
+ say(div, :color => :cyan, :bold => true)
39
+ say("@#{ testno } => ", :bold => true, :method => :print)
40
+ say(command, :color => :cyan, :bold => true)
41
+ say(line, :color => :cyan, :bold => true)
48
42
 
49
43
  system(command)
50
44
 
51
- This.say(line, :color => :cyan, :bold => true)
45
+ say(line, :color => :cyan, :bold => true)
52
46
 
53
47
  status = $?.exitstatus
54
48
 
55
49
  if status.zero?
56
- This.say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
57
- This.say("SUCCESS", :color => :green, :bold => true)
50
+ say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
51
+ say("SUCCESS", :color => :green, :bold => true)
58
52
  else
59
- This.say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
60
- This.say("FAILURE", :color => :red, :bold => true)
53
+ say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
54
+ say("FAILURE", :color => :red, :bold => true)
61
55
  end
62
- This.say(line, :color => :cyan, :bold => true)
56
+ say(line, :color => :cyan, :bold => true)
63
57
 
64
58
  exit(status) unless status.zero?
65
59
  end
@@ -68,8 +62,8 @@ end
68
62
 
69
63
  task :gemspec do
70
64
  ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
71
- ignore_directories = ['pkg', 'db']
72
- ignore_files = ['test/log', 'test/db.yml', 'a.rb', 'b.rb'] + Dir['db/*'] + %w'db'
65
+ ignore_directories = ['pkg']
66
+ ignore_files = ['test/log']
73
67
 
74
68
  shiteless =
75
69
  lambda do |list|
@@ -96,9 +90,10 @@ task :gemspec do
96
90
  files = shiteless[Dir::glob("**/**")]
97
91
  executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
98
92
  #has_rdoc = true #File.exist?('doc')
99
- test_files = test(?e, "test/#{ lib }.rb") ? "test/#{ lib }.rb" : nil
100
- summary = This.summary || This.synopsis || "#{ lib } kicks the ass"
101
- description = This.description || summary
93
+ test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
94
+ summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
95
+ description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
96
+ license = object.respond_to?(:license) ? object.license : "same as ruby's"
102
97
 
103
98
  if This.extensions.nil?
104
99
  This.extensions = []
@@ -109,70 +104,58 @@ task :gemspec do
109
104
  end
110
105
  extensions = [extensions].flatten.compact
111
106
 
112
- # TODO
113
- if This.dependencies.nil?
114
- dependencies = []
115
- else
116
- case This.dependencies
117
- when Hash
118
- dependencies = This.dependencies.values
119
- when Array
120
- dependencies = This.dependencies
121
- end
122
- end
123
-
124
107
  template =
125
108
  if test(?e, 'gemspec.erb')
126
- This.template_for{ IO.read('gemspec.erb') }
109
+ Template{ IO.read('gemspec.erb') }
127
110
  else
128
- This.template_for {
111
+ Template {
129
112
  <<-__
130
- ## <%= lib %>.gemspec
113
+ ## #{ lib }.gemspec
131
114
  #
132
115
 
133
116
  Gem::Specification::new do |spec|
134
- spec.name = <%= lib.inspect %>
135
- spec.version = <%= version.inspect %>
117
+ spec.name = #{ lib.inspect }
118
+ spec.version = #{ version.inspect }
136
119
  spec.platform = Gem::Platform::RUBY
137
- spec.summary = <%= lib.inspect %>
138
- spec.description = <%= description.inspect %>
120
+ spec.summary = #{ lib.inspect }
121
+ spec.description = #{ description.inspect }
122
+ spec.license = #{ license.inspect }
139
123
 
140
- spec.files =\n<%= files.sort.pretty_inspect %>
141
- spec.executables = <%= executables.inspect %>
124
+ spec.files =\n#{ files.sort.pretty_inspect }
125
+ spec.executables = #{ executables.inspect }
142
126
 
143
127
  spec.require_path = "lib"
144
128
 
145
- spec.test_files = <%= test_files.inspect %>
129
+ spec.test_files = #{ test_files.inspect }
146
130
 
147
- <% dependencies.each do |lib_version| %>
148
- spec.add_dependency(*<%= Array(lib_version).flatten.inspect %>)
149
- <% end %>
131
+ ### spec.add_dependency 'lib', '>= version'
132
+ #### spec.add_dependency 'map'
150
133
 
151
- spec.extensions.push(*<%= extensions.inspect %>)
134
+ spec.extensions.push(*#{ extensions.inspect })
152
135
 
153
- spec.rubyforge_project = <%= This.rubyforge_project.inspect %>
154
- spec.author = <%= This.author.inspect %>
155
- spec.email = <%= This.email.inspect %>
156
- spec.homepage = <%= This.homepage.inspect %>
136
+ spec.rubyforge_project = #{ This.rubyforge_project.inspect }
137
+ spec.author = #{ This.author.inspect }
138
+ spec.email = #{ This.email.inspect }
139
+ spec.homepage = #{ This.homepage.inspect }
157
140
  end
158
141
  __
159
142
  }
160
143
  end
161
144
 
162
- FileUtils.mkdir_p(This.pkgdir)
145
+ Fu.mkdir_p(This.pkgdir)
163
146
  gemspec = "#{ lib }.gemspec"
164
147
  open(gemspec, "w"){|fd| fd.puts(template)}
165
148
  This.gemspec = gemspec
166
149
  end
167
150
 
168
151
  task :gem => [:clean, :gemspec] do
169
- FileUtils.mkdir_p(This.pkgdir)
152
+ Fu.mkdir_p(This.pkgdir)
170
153
  before = Dir['*.gem']
171
154
  cmd = "gem build #{ This.gemspec }"
172
155
  `#{ cmd }`
173
156
  after = Dir['*.gem']
174
157
  gem = ((after - before).first || after.first) or abort('no gem!')
175
- FileUtils.mv(gem, This.pkgdir)
158
+ Fu.mv(gem, This.pkgdir)
176
159
  This.gem = File.join(This.pkgdir, File.basename(gem))
177
160
  end
178
161
 
@@ -186,21 +169,21 @@ task :readme do
186
169
  samples << "\n" << " <========< #{ sample } >========>" << "\n\n"
187
170
 
188
171
  cmd = "cat #{ sample }"
189
- samples << This.util.indent(prompt + cmd, 2) << "\n\n"
190
- samples << This.util.indent(`#{ cmd }`, 4) << "\n"
172
+ samples << Util.indent(prompt + cmd, 2) << "\n\n"
173
+ samples << Util.indent(`#{ cmd }`, 4) << "\n"
191
174
 
192
175
  cmd = "ruby #{ sample }"
193
- samples << This.util.indent(prompt + cmd, 2) << "\n\n"
176
+ samples << Util.indent(prompt + cmd, 2) << "\n\n"
194
177
 
195
178
  cmd = "ruby -e'STDOUT.sync=true; exec %(ruby -I ./lib #{ sample })'"
196
- samples << This.util.indent(`#{ cmd } 2>&1`, 4) << "\n"
179
+ samples << Util.indent(`#{ cmd } 2>&1`, 4) << "\n"
197
180
  end
198
181
 
199
182
  template =
200
183
  if test(?e, 'readme.erb')
201
- This.template_for{ IO.read('readme.erb') }
184
+ Template{ IO.read('readme.erb') }
202
185
  else
203
- This.template_for {
186
+ Template {
204
187
  <<-__
205
188
  NAME
206
189
  #{ lib }
@@ -221,7 +204,7 @@ end
221
204
 
222
205
 
223
206
  task :clean do
224
- Dir[File.join(This.pkgdir, '**/**')].each{|entry| FileUtils.rm_rf(entry)}
207
+ Dir[File.join(This.pkgdir, '**/**')].each{|entry| Fu.rm_rf(entry)}
225
208
  end
226
209
 
227
210
 
@@ -236,11 +219,11 @@ task :release => [:clean, :gemspec, :gem] do
236
219
  system(cmd)
237
220
  abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
238
221
 
239
- #cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.gem }"
240
- #puts cmd
241
- #puts
242
- #system(cmd)
243
- #abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
222
+ cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.gem }"
223
+ puts cmd
224
+ puts
225
+ system(cmd)
226
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
244
227
  end
245
228
 
246
229
 
@@ -252,106 +235,60 @@ BEGIN {
252
235
  #
253
236
  $VERBOSE = nil
254
237
 
238
+ require 'ostruct'
255
239
  require 'erb'
256
240
  require 'fileutils'
257
241
  require 'rbconfig'
258
242
  require 'pp'
259
243
 
260
- # cache a bunch of stuff about this rakefile/environment
244
+ # fu shortcut
261
245
  #
246
+ Fu = FileUtils
262
247
 
263
- This =
264
- Class.new(Hash) do
265
-
266
- def method_missing(method, *args, &block)
267
- if method.to_s =~ /=/
268
- key = method.to_s.chomp('=')
269
- value = block ? block : args.shift
270
- self[key] = value
271
- else
272
- key = method.to_s
273
- if block
274
- value = block
275
- self[key] = value
276
- else
277
- value = self[key]
278
-
279
- if value.respond_to?(:call)
280
- self[key] = value.call()
281
- else
282
- value
283
- end
284
- end
285
- end
286
- end
287
-
288
- def inspect
289
- expand!
290
- PP.pp(self, '')
291
- end
292
-
293
- def expand!
294
- keys.each do |key|
295
- value = self[key]
296
- if value.respond_to?(:call)
297
- self[key] = value.call()
298
- end
299
- end
300
- end
301
-
302
- end.new()
248
+ # cache a bunch of stuff about this rakefile/environment
249
+ #
250
+ This = OpenStruct.new
303
251
 
304
252
  This.file = File.expand_path(__FILE__)
305
253
  This.dir = File.dirname(This.file)
306
254
  This.pkgdir = File.join(This.dir, 'pkg')
307
255
 
308
- # defaults
256
+ # grok lib
309
257
  #
310
- This.lib do
311
- File.basename(Dir.pwd)
258
+ lib = ENV['LIB']
259
+ unless lib
260
+ lib = File.basename(Dir.pwd).sub(/[-].*$/, '')
312
261
  end
262
+ This.lib = lib
313
263
 
314
- def This.setup!
315
- begin
316
- require "./lib/#{ This.lib }"
317
- rescue LoadError
318
- abort("could not load #{ This.lib }")
319
- end
320
- end
321
-
322
- This.name do
323
- This.name = This.lib.capitalize
324
- end
325
-
326
- This.object do
327
- begin
328
- This.object = eval(This.name)
329
- rescue Object
330
- abort("could not determine object from #{ This.name }")
331
- end
332
- end
333
-
334
- This.version do
335
- This.object.send(:version)
264
+ # grok version
265
+ #
266
+ version = ENV['VERSION']
267
+ unless version
268
+ require "./lib/#{ This.lib }"
269
+ This.name = lib.capitalize
270
+ This.object = eval(This.name)
271
+ version = This.object.send(:version)
336
272
  end
273
+ This.version = version
337
274
 
338
- This.dependencies do
339
- if This.object.respond_to?(:dependencies)
340
- This.object.dependencies
341
- end
342
- end
275
+ # we need to know the name of the lib an it's version
276
+ #
277
+ abort('no lib') unless This.lib
278
+ abort('no version') unless This.version
343
279
 
344
- This.ruby do
345
- c = Config::CONFIG
346
- bindir = c["bindir"] || c['BINDIR']
347
- ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
348
- ruby_ext = c['EXEEXT'] || ''
349
- File.join(bindir, (ruby_install_name + ruby_ext))
350
- end
280
+ # discover full path to this ruby executable
281
+ #
282
+ c = Config::CONFIG
283
+ bindir = c["bindir"] || c['BINDIR']
284
+ ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
285
+ ruby_ext = c['EXEEXT'] || ''
286
+ ruby = File.join(bindir, (ruby_install_name + ruby_ext))
287
+ This.ruby = ruby
351
288
 
352
289
  # some utils
353
290
  #
354
- This.util = Module.new do
291
+ module Util
355
292
  def indent(s, n = 2)
356
293
  s = unindent(s)
357
294
  ws = ' ' * n
@@ -361,33 +298,27 @@ BEGIN {
361
298
  def unindent(s)
362
299
  indent = nil
363
300
  s.each_line do |line|
364
- next if line =~ %r/^\s*$/
365
- indent = line[%r/^\s*/] and break
366
- end
367
- indent ? s.gsub(%r/^#{ indent }/, "") : s
301
+ next if line =~ %r/^\s*$/
302
+ indent = line[%r/^\s*/] and break
368
303
  end
369
-
304
+ indent ? s.gsub(%r/^#{ indent }/, "") : s
305
+ end
370
306
  extend self
371
307
  end
372
308
 
373
309
  # template support
374
310
  #
375
- This.template = Class.new do
311
+ class Template
376
312
  def initialize(&block)
377
313
  @block = block
378
314
  @template = block.call.to_s
379
315
  end
380
-
381
316
  def expand(b=nil)
382
- ERB.new(This.util.unindent(@template)).result((b||@block).binding)
317
+ ERB.new(Util.unindent(@template)).result((b||@block).binding)
383
318
  end
384
-
385
319
  alias_method 'to_s', 'expand'
386
320
  end
387
-
388
- def This.template_for(*args, &block)
389
- This.template.new(*args, &block)
390
- end
321
+ def Template(*args, &block) Template.new(*args, &block) end
391
322
 
392
323
  # colored console output support
393
324
  #
@@ -420,8 +351,7 @@ BEGIN {
420
351
  :on_cyan => "\e[46m",
421
352
  :on_white => "\e[47m"
422
353
  }
423
-
424
- def This.say(something, *args)
354
+ def say(phrase, *args)
425
355
  options = args.last.is_a?(Hash) ? args.pop : {}
426
356
  options[:color] = args.shift.to_s.to_sym unless args.empty?
427
357
  keys = options.keys
@@ -430,7 +360,7 @@ BEGIN {
430
360
  color = options[:color]
431
361
  bold = options.has_key?(:bold)
432
362
 
433
- parts = [something]
363
+ parts = [phrase]
434
364
  parts.unshift(This.ansi[color]) if color
435
365
  parts.unshift(This.ansi[:bold]) if bold
436
366
  parts.push(This.ansi[:clear]) if parts.size > 1
data/lib/rails_view.rb CHANGED
@@ -2,70 +2,73 @@ require 'rails' unless defined?(::Rails)
2
2
  require 'action_controller' unless defined?(::ActionController)
3
3
 
4
4
  class View
5
- VERSION = '1.2.0'
5
+ VERSION = '2.0.0'
6
6
 
7
7
  def View.version
8
8
  View::VERSION
9
9
  end
10
10
 
11
- if defined?(Rails::Engine)
12
- class Engine < Rails::Engine
13
- config.after_initialize do
14
- ::View.generate_controller!
11
+ def View.load_shit!
12
+ @loaded_shit ||= (
13
+ unless defined?(::Rails)
14
+ require 'rails'
15
15
  end
16
- end
17
- else
18
- ::View.generate_controller!
16
+
17
+ unless defined?(::ActionController)
18
+ require 'action_controller'
19
+ end
20
+
21
+ unless defined?(::ActionDispatch::TestRequest)
22
+ require 'action_dispatch/testing/test_request.rb'
23
+ end
24
+
25
+ unless defined?(::ActionDispatch::TestResponse)
26
+ require 'action_dispatch/testing/test_response.rb'
27
+ end
28
+
29
+ true
30
+ )
19
31
  end
20
32
 
21
- def View.generate_controller!
22
- #base = (defined?(ApplicationController) ? ApplicationController : ::ActionController::Base)
23
- base = ::ActionController::Base
33
+ def View.controller(&block)
34
+ load_shit!
24
35
 
25
- c = Class.new(base) do
36
+ controller_class = Class.new(::ActionController::Base) do
26
37
  layout false
27
38
  helper :all
39
+ end
28
40
 
29
- def self.context(*args, &block)
30
- require 'rails'
31
- require 'action_controller'
32
- require 'action_dispatch/testing/test_request.rb'
33
- require 'action_dispatch/testing/test_response.rb'
41
+ default_url_options =
42
+ begin
43
+ require 'rails_default_url_options'
44
+ DefaultUrlOptions
45
+ rescue LoadError
46
+ options[:default_url_options] || {}
47
+ end
34
48
 
35
- default_url_options =
36
- begin
37
- require 'rails_default_url_options'
38
- DefaultUrlOptions
39
- rescue LoadError
40
- options[:default_url_options] || {}
41
- end
42
-
43
- store = ActiveSupport::Cache::MemoryStore.new
44
- request = ActionDispatch::TestRequest.new
45
- response = ActionDispatch::TestResponse.new
46
-
47
- controller = new()
48
-
49
- controller.perform_caching = false
50
- controller.cache_store = store
51
- controller.request = request
52
- controller.response = response
53
- #controller.send(:initialize_template_class, response)
54
- #controller.send(:assign_shortcuts, request, response)
55
- controller.send(:default_url_options).merge!(default_url_options)
56
- block ? controller.instance_eval(&block) : controller
57
- end
58
- end
49
+ store = ActiveSupport::Cache::MemoryStore.new
50
+ request = ActionDispatch::TestRequest.new
51
+ response = ActionDispatch::TestResponse.new
59
52
 
60
- const_set(:Controller, c)
61
- end
53
+ controller = controller_class.new()
62
54
 
55
+ controller.perform_caching = false
56
+ controller.cache_store = store
57
+ controller.request = request
58
+ controller.response = response
59
+ #controller.send(:initialize_template_class, response)
60
+ #controller.send(:assign_shortcuts, request, response)
61
+ controller.send(:default_url_options).merge!(default_url_options)
62
+ block ? controller.instance_eval(&block) : controller
63
+ end
63
64
 
64
65
  def View.render(*args)
65
- Array(Controller.context{ render(*args) }).join.html_safe
66
+ Array(View.controller{ render(*args) }).join.html_safe
66
67
  end
67
68
  end
68
69
 
70
+ Rails_view = ::View
71
+
69
72
  __END__
70
73
  puts View.render(:inline => "<%= Time.now %> <%= link_to :foo, root_path %><%= solid :bar %><%= link_to :chiclet, Chiclet.first %>")
71
74
  puts View.render(:inline => "* one\n* two\n* three\n", :type => :markdown)
data/rails_view.gemspec CHANGED
@@ -3,10 +3,11 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "rails_view"
6
- spec.version = "1.2.0"
6
+ spec.version = "2.0.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "rails_view"
9
- spec.description = "View.render(:template => 'shared/view', :locals => {:key => :val})"
9
+ spec.description = "description: rails_view kicks the ass"
10
+ spec.license = "same as ruby's"
10
11
 
11
12
  spec.files =
12
13
  ["README.md",
@@ -24,7 +25,8 @@ Gem::Specification::new do |spec|
24
25
 
25
26
  spec.test_files = nil
26
27
 
27
-
28
+ ### spec.add_dependency 'lib', '>= version'
29
+ #### spec.add_dependency 'map'
28
30
 
29
31
  spec.extensions.push(*[])
30
32
 
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-23 00:00:00.000000000 Z
11
+ date: 2013-11-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: View.render(:template => 'shared/view', :locals => {:key => :val})
13
+ description: ! 'description: rails_view kicks the ass'
14
14
  email: ara.t.howard@gmail.com
15
15
  executables: []
16
16
  extensions: []
@@ -23,7 +23,8 @@ files:
23
23
  - test/rails_view_test.rb
24
24
  - test/testing.rb
25
25
  homepage: https://github.com/ahoward/rails_view
26
- licenses: []
26
+ licenses:
27
+ - same as ruby's
27
28
  metadata: {}
28
29
  post_install_message:
29
30
  rdoc_options: []