presenter-pattern 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,12 +1,9 @@
1
1
  README.rdoc
2
2
  Rakefile
3
- lib/json-builder/handler.rb
4
- lib/json-builder/railtie.rb
5
3
  lib/presenter-pattern.rb
6
4
  lib/presenter-pattern/railtie.rb
5
+ presenter-pattern.gemspec
7
6
  rails/init.rb
8
- test/json_responder_test.rb
9
- test/json_view_test.rb
10
7
  test/no_querying_view_test.rb
11
8
  test/only_data_in_view_test.rb
12
9
  test/setup_test.rb
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('presenter-pattern', '0.2.0') do |p|
5
+ Echoe.new('presenter-pattern', '0.2.1') do |p|
6
6
  p.description = "Enables and enforces the presenter pattern in rails"
7
7
  p.url = "https://github.com/jleven/presenter-pattern"
8
8
  p.author = "Josh Leven"
@@ -1,5 +1,4 @@
1
1
  require 'presenter-pattern/railtie'
2
- require 'json-builder/railtie'
3
2
 
4
3
  module PresenterPattern
5
4
  def protected_instance_variables
@@ -2,22 +2,22 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{presenter-pattern}
5
- s.version = "0.2.0"
5
+ s.version = "0.2.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Josh Leven"]
9
9
  s.date = %q{2011-05-25}
10
10
  s.description = %q{Enables and enforces the presenter pattern in rails}
11
11
  s.email = %q{josh.leven@gmail.com}
12
- s.extra_rdoc_files = ["README.rdoc", "lib/json-builder/handler.rb", "lib/json-builder/railtie.rb", "lib/presenter-pattern.rb", "lib/presenter-pattern/railtie.rb"]
13
- s.files = ["README.rdoc", "Rakefile", "lib/json-builder/handler.rb", "lib/json-builder/railtie.rb", "lib/presenter-pattern.rb", "lib/presenter-pattern/railtie.rb", "rails/init.rb", "test/json_responder_test.rb", "test/json_view_test.rb", "test/no_querying_view_test.rb", "test/only_data_in_view_test.rb", "test/setup_test.rb", "test/test_helper.rb", "Manifest", "presenter-pattern.gemspec"]
12
+ s.extra_rdoc_files = ["README.rdoc", "lib/presenter-pattern.rb", "lib/presenter-pattern/railtie.rb"]
13
+ s.files = ["README.rdoc", "Rakefile", "lib/presenter-pattern.rb", "lib/presenter-pattern/railtie.rb", "presenter-pattern.gemspec", "rails/init.rb", "test/no_querying_view_test.rb", "test/only_data_in_view_test.rb", "test/setup_test.rb", "test/test_helper.rb", "Manifest"]
14
14
  s.homepage = %q{https://github.com/jleven/presenter-pattern}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Presenter-pattern", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{presenter-pattern}
18
18
  s.rubygems_version = %q{1.7.2}
19
19
  s.summary = %q{Enables and enforces the presenter pattern in rails}
20
- s.test_files = ["test/json_responder_test.rb", "test/json_view_test.rb", "test/no_querying_view_test.rb", "test/only_data_in_view_test.rb", "test/setup_test.rb", "test/test_helper.rb"]
20
+ s.test_files = ["test/no_querying_view_test.rb", "test/only_data_in_view_test.rb", "test/setup_test.rb", "test/test_helper.rb"]
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presenter-pattern
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -17,26 +17,20 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files:
19
19
  - README.rdoc
20
- - lib/json-builder/handler.rb
21
- - lib/json-builder/railtie.rb
22
20
  - lib/presenter-pattern.rb
23
21
  - lib/presenter-pattern/railtie.rb
24
22
  files:
25
23
  - README.rdoc
26
24
  - Rakefile
27
- - lib/json-builder/handler.rb
28
- - lib/json-builder/railtie.rb
29
25
  - lib/presenter-pattern.rb
30
26
  - lib/presenter-pattern/railtie.rb
27
+ - presenter-pattern.gemspec
31
28
  - rails/init.rb
32
- - test/json_responder_test.rb
33
- - test/json_view_test.rb
34
29
  - test/no_querying_view_test.rb
35
30
  - test/only_data_in_view_test.rb
36
31
  - test/setup_test.rb
37
32
  - test/test_helper.rb
38
33
  - Manifest
39
- - presenter-pattern.gemspec
40
34
  homepage: https://github.com/jleven/presenter-pattern
41
35
  licenses: []
42
36
  post_install_message:
@@ -68,8 +62,6 @@ signing_key:
68
62
  specification_version: 3
69
63
  summary: Enables and enforces the presenter pattern in rails
70
64
  test_files:
71
- - test/json_responder_test.rb
72
- - test/json_view_test.rb
73
65
  - test/no_querying_view_test.rb
74
66
  - test/only_data_in_view_test.rb
75
67
  - test/setup_test.rb
@@ -1,11 +0,0 @@
1
- module JsonBuilder
2
- class Handler < ActionView::Template::Handler
3
- include ActionView::Template::Handlers::Compilable
4
-
5
- self.default_format = Mime::JSON
6
-
7
- def compile(template)
8
- "#{template.source}.to_json"
9
- end
10
- end
11
- end
@@ -1,12 +0,0 @@
1
- require 'rails/railtie'
2
- require 'json-builder/handler'
3
-
4
- module JsonBuilder
5
- class Railtie < Rails::Railtie
6
- config.after_initialize do
7
-
8
- ActionView::Template.register_template_handler(:rjson, ::JsonBuilder::Handler)
9
-
10
- end
11
- end
12
- end
@@ -1,17 +0,0 @@
1
- require 'test_helper'
2
-
3
- class JsonResponderTest < ActionController::TestCase
4
- tests BarsController
5
-
6
- def setup
7
- super
8
- @name = "Hello World!"
9
- @bar = Bar.create :name => @name
10
- end
11
-
12
- def test_data_variable_in_view
13
- get :show, :id => @bar.id, :format => 'json'
14
- assert_response :success
15
- assert_equal '{"name":"Hello World!","fruit":"banana"}', @response.body
16
- end
17
- end
@@ -1,17 +0,0 @@
1
- require 'test_helper'
2
-
3
- class JsonViewTest < ActionController::TestCase
4
- tests FoosController
5
-
6
- def setup
7
- super
8
- @name = "Hello World!"
9
- @foo = Foo.create :name => @name
10
- end
11
-
12
- def test_data_variable_in_view
13
- get :show, :id => @foo.id, :format => 'json'
14
- assert_response :success
15
- assert_equal '{"name":"Hello World!","array":["a","c"],"hash":{"value1":1,"value2":["a","b","c"]}}', @response.body
16
- end
17
- end