jb 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb74db932925f1909325449f10a2ac2351ef0bb3b1a010828167d72455971f95
4
- data.tar.gz: 7164ea018d3efa679e7dcb87dd99c5c5747c04786abc970a8aa6a00144d36ed1
3
+ metadata.gz: 6ca467cd19f3fca6dbde7da0700ab9b6c3b5c01c1ba64a27e1ddbf355308997e
4
+ data.tar.gz: 2219ef6038f54814c87dd9a43cc8e89e61385867c408e4756b037e0b73fc5fd6
5
5
  SHA512:
6
- metadata.gz: 723fe0582c315422cc15b0852ad5a3ddbefcad568aa0d98d1d0a2812bc293ca25a420e9111c15925c92ac9be1f848b63f00c0d0867ec60ba83c44940d434d607
7
- data.tar.gz: f7b76dadc834f0aefca888e502c641792eb7824e864bcf63374f162d38916f9a285a34f0463af37e4a3c507bb46b9dcd4ae7ac6cf0c7765a4d5a6442650108f1
6
+ metadata.gz: 64d1623fff2ed66f5772f95181b88b657ec92708be1604968798f5bf83a8e20f3ddc46bebb636694ea55b13460fca592b3ca13afadbdb26ac98354e2df0f9532
7
+ data.tar.gz: 5ecf819da2af617a4681ac9f29d89d2cff1e3eb342c7c018ab229b12df8090a6039d74a4675903e8239a3b96afd1bba09b433a9849a4fe163f95101e2746bfb9
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
+ gemfiles/*.lock
4
5
  /_yardoc/
5
6
  /coverage/
6
7
  /doc/
@@ -1,5 +1,14 @@
1
1
  sudo: false
2
2
  language: ruby
3
- rvm:
4
- - 2.4.1
3
+
5
4
  before_install: gem update bundler
5
+
6
+ rvm:
7
+ - 2.6.0
8
+ - 2.5.3
9
+
10
+ gemfile:
11
+ - gemfiles/rails_52.gemfile
12
+ - gemfiles/rails_51.gemfile
13
+ - gemfiles/rails_50.gemfile
14
+ - gemfiles/rails_42.gemfile
data/Gemfile CHANGED
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  source 'https://rubygems.org'
3
4
 
4
5
  # Specify your gem's dependencies in jb.gemspec
5
6
  gemspec
6
7
 
7
8
  # For benchmarking
8
- gem 'jbuilder'
9
- gem 'benchmark-ips'
10
9
  gem 'action_args'
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "bundler/gem_tasks"
3
4
  require "rake/testtask"
4
5
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  cd $(dirname "$0")/../test/dummy_app
4
4
 
5
- BUNDLE_GEMFILE=../../Gemfile bundle e rails r bin/bench.rb
5
+ BUNDLE_GEMFILE=../../gemfiles/benchmark.gemfile bundle e rails r bin/bench.rb
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'rake'
6
+ gem 'rails'
7
+
8
+ gem 'jbuilder'
9
+ gem 'benchmark-ips'
10
+ gem 'action_args'
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec :path => '../'
6
+
7
+ gem 'rails', '~> 4.2.0'
8
+ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7'
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec :path => '../'
6
+
7
+ gem 'rails', '~> 5.0.0'
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec :path => '../'
6
+
7
+ gem 'rails', '~> 5.1.0'
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec :path => '../'
6
+
7
+ gem 'rails', '~> 5.2.0'
data/jb.gemspec CHANGED
@@ -1,5 +1,6 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
+
3
4
  lib = File.expand_path('../lib', __FILE__)
4
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
6
  require 'jb/version'
@@ -26,5 +27,5 @@ Gem::Specification.new do |spec|
26
27
  spec.add_development_dependency 'rake'
27
28
  spec.add_development_dependency 'test-unit-rails'
28
29
  spec.add_development_dependency 'rails'
29
- spec.add_development_dependency 'capybara'
30
+ spec.add_development_dependency 'action_args'
30
31
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rails/generators/named_base'
3
4
  require 'rails/generators/resource_helpers'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'rails/generators'
3
4
  require 'rails/generators/rails/scaffold_controller/scaffold_controller_generator'
4
5
 
data/lib/jb.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "jb/version"
3
4
  require 'jb/railtie'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'multi_json'
3
4
 
4
5
  module Jb
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Jb
3
4
  class Handler
4
5
  class_attribute :default_format
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Jb
3
4
  class Railtie < ::Rails::Railtie
4
5
  initializer 'jb' do
@@ -9,6 +10,21 @@ module Jb
9
10
  end
10
11
  end
11
12
 
13
+ if Rails::VERSION::MAJOR >= 5
14
+ module ::ActionController
15
+ module ApiRendering
16
+ include ActionView::Rendering
17
+ end
18
+ end
19
+
20
+ ActiveSupport.on_load :action_controller do
21
+ if self == ActionController::API
22
+ include ActionController::Helpers
23
+ include ActionController::ImplicitRender
24
+ end
25
+ end
26
+ end
27
+
12
28
  generators do |app|
13
29
  Rails::Generators.configure! app.config.generators
14
30
  Rails::Generators.hidden_namespaces.uniq!
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Jb
3
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
4
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-21 00:00:00.000000000 Z
11
+ date: 2019-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: capybara
84
+ name: action_args
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -110,6 +110,11 @@ files:
110
110
  - bin/benchmark.sh
111
111
  - bin/console
112
112
  - bin/setup
113
+ - gemfiles/benchmark.gemfile
114
+ - gemfiles/rails_42.gemfile
115
+ - gemfiles/rails_50.gemfile
116
+ - gemfiles/rails_51.gemfile
117
+ - gemfiles/rails_52.gemfile
113
118
  - jb.gemspec
114
119
  - lib/generators/rails/jb_generator.rb
115
120
  - lib/generators/rails/scaffold_controller_generator.rb
@@ -139,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
144
  - !ruby/object:Gem::Version
140
145
  version: '0'
141
146
  requirements: []
142
- rubyforge_project:
143
- rubygems_version: 2.7.3
147
+ rubygems_version: 3.0.1
144
148
  signing_key:
145
149
  specification_version: 4
146
150
  summary: Faster and simpler Jbuilder alternative