tuxedo_decorate 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17ba5db3f56262006be9c6714471023d40461507
4
- data.tar.gz: 8498c3544d4f423dca7cb43095caf2c9f06c305d
3
+ metadata.gz: 4de66ac13f35c6683b56dd28c8268fadc5b9ed59
4
+ data.tar.gz: 16da8c9198868aee6849c3093399194fa2bcc736
5
5
  SHA512:
6
- metadata.gz: 055e6519ee3e865a432324ca23e1a2c9edc988564ae2fa96c3c08770c8d09bb0dcb0c4010a62f4f6de01038f6c439a5c6127b4f762b08585ef1f2ac1c98e65db
7
- data.tar.gz: ce393d9548283440656c317e97b0e68337090a07547912b2f9f0a92d4f0d6b746b38f20a985fe4f7128291ab2fc37556b6a4723020f707eb79a94f4e51357951
6
+ metadata.gz: cac6f2c2847ea10d6524bd56bfb152c4d5eecc405fc9da9634bbb3af276258546b0f7dd071c39adfbcfffb053506ac2f603e7823b60d6eff2498b58175a09af3
7
+ data.tar.gz: 2eed5764d80ef3b4dd71a4d6dad3fe6d24a82806bc723e6d2fda91c595f5e1715afd87c8e41c1a8fd2e7fb0063eb4ee2ce056a67dc125f1af735df7994238798
@@ -1,17 +1,7 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2015-12-23 09:36:21 +0100 using RuboCop version 0.35.1.
3
+ # on 2016-07-21 13:12:55 +0200 using RuboCop version 0.41.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 11
10
- # Configuration parameters: AllowURI, URISchemes.
11
- Metrics/LineLength:
12
- Max: 124
13
-
14
- # Offense count: 5
15
- # Configuration parameters: Exclude.
16
- Style/Documentation:
17
- Enabled: false
@@ -2,10 +2,10 @@ language: ruby
2
2
  cache: bundler
3
3
  sudo: false
4
4
  rvm:
5
- - 2.0.0
6
- - 2.2
5
+ - 2.2.0
6
+ - 2.3.1
7
7
  - ruby-head
8
- - jruby-9.0.1.0
8
+ - jruby-9.1.2.0
9
9
  - rbx-2
10
10
  env:
11
11
  - JRUBY_OPTS="-Xcli.debug=true --debug"
data/Appraisals CHANGED
@@ -14,6 +14,6 @@ appraise "rails-4.2" do
14
14
  end
15
15
 
16
16
  appraise "rails-stable" do
17
- gem 'activesupport', '4.2.5'
18
- gem 'railties', '4.2.5'
17
+ gem 'activesupport', '5.0.0'
18
+ gem 'railties', '5.0.0'
19
19
  end
@@ -2,6 +2,11 @@
2
2
  ## Unreleased
3
3
  - Add your entry here!
4
4
 
5
+ ## v0.5.0
6
+ - Updated Travis to build on latest ruby/jruby version
7
+ - Updated dependencies
8
+ - Also test on Rails 5 (Tuxedo is Rails 5.0 ready)
9
+
5
10
  ## v0.4.0
6
11
  - Fixes #3: Using `alias_method` instead of `define_method` to improve performance
7
12
 
data/Gemfile CHANGED
@@ -3,12 +3,12 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in tuxedo.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rake', '~> 10.1'
7
- gem 'rspec', '~> 3.4.0'
8
- gem 'yard', '~> 0.8'
9
- gem 'simplecov', '~> 0.10'
6
+ gem 'rake', '~> 11.2'
7
+ gem 'rspec', '~> 3.5.0'
8
+ gem 'yard', '~> 0.9'
9
+ gem 'simplecov', '~> 0.12'
10
10
  gem 'appraisal', '~> 2.1.0'
11
- gem 'rubocop', '~> 0.35.0'
11
+ gem 'rubocop', '~> 0.41.0'
12
12
 
13
13
  group :test do
14
14
  gem 'codeclimate-test-reporter', require: false
@@ -26,10 +26,12 @@ require 'tuxedo/railtie' if defined?(Rails)
26
26
  # end
27
27
  #
28
28
  module Tuxedo
29
+ # InstanceMethods that are available in every presenter
29
30
  module InstanceMethods
30
31
  include Charlatan.new(:object)
31
32
 
32
- # Initializes a new Tuxedo class using the to decorate object and the view context
33
+ # Initializes a new Tuxedo class using the to decorate object
34
+ # and the view context
33
35
  # @param [Object] object to decorate
34
36
  # @param [ActionView::Context] view_context
35
37
  #
@@ -50,8 +52,8 @@ module Tuxedo
50
52
  @view_context
51
53
  end
52
54
 
53
- # Define delegations of our prac helper to the view context, allows to call prac inside the
54
- # presenters
55
+ # Define delegations of our prac helper to the view context,
56
+ # allows to call prac inside the presenters
55
57
  delegate(:prac, to: :_h)
56
58
 
57
59
  # These methods are already defined on Object by default or by rails, so we
@@ -59,6 +61,7 @@ module Tuxedo
59
61
  delegate(:to_param, to: :object)
60
62
  end
61
63
 
64
+ # ClassMethods that are available in every presenter
62
65
  module ClassMethods
63
66
  # Alias method name for accessing the original object
64
67
  # Defaults to guessing the name from the class
@@ -78,7 +81,7 @@ module Tuxedo
78
81
  end
79
82
 
80
83
  # @api private
81
- # This setup (after initialize) a new method for accessing the original object
84
+ # Setup (after initialize) a new method for accessing the original object
82
85
  #
83
86
  def setup_alias_method(name = underscored_name)
84
87
  alias_method(name, :object)
@@ -33,7 +33,7 @@ module Tuxedo
33
33
  #
34
34
  # @example
35
35
  #
36
- # prac object :zone_label
36
+ # prac object, :zone_label
37
37
  #
38
38
  # @param object [Object]
39
39
  # @param method [method] the method we should call on the presentor
@@ -1,5 +1,6 @@
1
1
  require 'active_support/configurable'
2
2
 
3
+ # Tuxedo main module
3
4
  module Tuxedo
4
5
  # Configures global settings for Tuxedo
5
6
  #
@@ -1,6 +1,9 @@
1
1
  require 'rails/railtie'
2
2
 
3
+ # Tuxedo main module
3
4
  module Tuxedo
5
+ # Railtie that allows to include the Tuxedo::ActionView::Helpers
6
+ # makes it possible to use `prac` and `presenter_for`
4
7
  class Railtie < ::Rails::Railtie
5
8
  initializer 'tuxedo.action_view' do
6
9
  ActiveSupport.on_load :action_view do
@@ -1,3 +1,4 @@
1
+ # Tuxedo main module
1
2
  module Tuxedo
2
- VERSION = '0.4.0'.freeze
3
+ VERSION = '0.5.0'.freeze
3
4
  end
@@ -4,25 +4,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'tuxedo/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = 'tuxedo_decorate'
8
- gem.version = Tuxedo::VERSION
9
- gem.authors = ['Jan Stevens', 'Maarten Claes']
10
- gem.email = ['jan@playpass.be', 'mcls@playpass.be']
7
+ gem.name = 'tuxedo_decorate'
8
+ gem.version = Tuxedo::VERSION
9
+ gem.authors = ['Jan Stevens', 'Maarten Claes']
10
+ gem.email = ['jan@playpass.be', 'mcls@playpass.be']
11
11
 
12
- gem.summary = 'Tuxedo simple presenter logic under 150 LOC'
13
- gem.homepage = 'https://github.com/playpasshq/tuxedo'
14
- gem.license = 'MIT'
12
+ gem.summary = 'Tuxedo simple presenter logic under 150 LOC'
13
+ gem.homepage = 'https://github.com/playpasshq/tuxedo'
14
+ gem.license = 'MIT'
15
15
 
16
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
- # delete this section to allow pushing this gem to any host.
18
- if gem.respond_to?(:metadata)
19
- gem.metadata['allowed_push_host'] = 'https://rubygems.org'
20
- else
21
- fail 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
22
- end
16
+ gem.metadata['allowed_push_host'] = 'https://rubygems.org'
23
17
 
24
- gem.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|gem|features)/}) }
25
- gem.test_files = gem.files.grep(%r{^(test|gem|features)/})
18
+ gem.files = `git ls-files -z`.split("\x0").reject do |f|
19
+ f.match(%r{^(test|gem|features)/})
20
+ end
21
+ gem.test_files = gem.files.grep(%r{^(test|gem|features)/})
26
22
  gem.require_paths = ['lib']
27
23
 
28
24
  gem.add_dependency 'activesupport', '>= 4.0.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tuxedo_decorate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Stevens
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-18 00:00:00.000000000 Z
12
+ date: 2016-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -113,9 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.5.1
116
+ rubygems_version: 2.6.4
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Tuxedo simple presenter logic under 150 LOC
120
120
  test_files: []
121
- has_rdoc: