glow 0.0.15 → 0.0.16

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
  SHA1:
3
- metadata.gz: f0550be368ae00a626ff64429e3747c7f3857344
4
- data.tar.gz: 693ed08c618b648ce4370d4480ddc6b5f6a85f8b
3
+ metadata.gz: df9186c0da8a8d2ccec64c0dcd5309b750abfa13
4
+ data.tar.gz: 16c654a7a1cfddde426a0ead6e1afcd9590af6e3
5
5
  SHA512:
6
- metadata.gz: ebb004662219a21c4265569adb1407946675fa33904a289de52220a1a67bfa52e80d09495ff4cef67546568cbefbee0de7a53f1f91a2c7c9c94c1cd78ff6774c
7
- data.tar.gz: bf1a9d81292d5d121d05337fc4906a9289846d7b53c7679a30a40f53fe07e507f4ab33becb610e69a1eca2e6b943857e5a531f4068a3b0da0f6effaed11dc86f
6
+ metadata.gz: 633193f5c7abed31cd56cc1de59497f6e4393d6671d6bd6fbcba14246052545ed018ed2b1047daf727b9d9b8474990871db0a648e5a6bcdcfeb4c7a4fa65ea19
7
+ data.tar.gz: 195ea5b8ed22967a6177ebeebfec1d0de9574444368632b54cef0ccc57df73c653651d42b7ac9c1855de550b422e9f0f3b992e243edbcd8d7d894b9a90ded46c
@@ -1,10 +1,11 @@
1
+ language: ruby
1
2
  before_install:
2
3
  - "export DISPLAY=:99.0"
3
4
  - "sh -e /etc/init.d/xvfb start"
4
5
  env:
5
- - "RAILS_VERSION=4.2.8"
6
- - "RAILS_VERSION=5.0.3"
7
- - "RAILS_VERSION=5.1.1"
6
+ - "RAILS_VERSION=5.0.6"
7
+ - "RAILS_VERSION=5.1.5"
8
8
  rvm:
9
- - 2.2.7
10
- - 2.3.4
9
+ - 2.3.6
10
+ - 2.4.3
11
+ - 2.5.0
data/README.md CHANGED
@@ -76,19 +76,7 @@ In your gemfile add
76
76
 
77
77
  .
78
78
 
79
- ### Rails 3.0
80
-
81
- Run
82
-
83
- rails generate glow:install
84
-
85
- Then add
86
-
87
- javascipt_include_tag 'glow'
88
-
89
- to your layout.
90
-
91
- ### Rails >=3.1 (including Rails 4)
79
+ ### Rails >= 4
92
80
 
93
81
  Add
94
82
 
@@ -96,6 +84,10 @@ Add
96
84
 
97
85
  to your manifest.
98
86
 
87
+ ### Rails 3
88
+
89
+ Please use [v0.0.14](https://github.com/zweitag/glow/tree/v0.0.14)
90
+
99
91
  ## License
100
92
 
101
93
  See MIT-LICENSE.
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.rdoc_options = ['--main', 'README.md', '--charset=UTF-8']
25
25
  s.extra_rdoc_files = ['README.md', 'MIT-LICENSE']
26
26
 
27
- s.add_dependency "railties", ">= 3.0.0"
28
- s.add_dependency "actionpack", ">= 3.0.0"
27
+ s.add_dependency "railties", ">= 4.0.0"
28
+ s.add_dependency "actionpack", ">= 4.0.0"
29
29
  s.add_dependency "jquery-rails"
30
30
  end
@@ -1,8 +1,4 @@
1
1
  module Glow
2
- if ::Rails.version < "3.1"
3
- require 'glow/railtie'
4
- else
5
- require 'glow/engine'
6
- end
2
+ require 'glow/engine'
7
3
  require 'glow/version'
8
4
  end
@@ -1,3 +1,3 @@
1
1
  module Glow
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -3,24 +3,20 @@ require 'spec_helper'
3
3
  require 'htmlentities'
4
4
 
5
5
  ActionDispatch::Flash::FlashHash.class_eval do
6
- if Rails::VERSION::MAJOR == 3
7
- def discard?(key); @used.include?(key); end
8
- else
9
- def discard?(key); @discard.include?(key); end
10
- end
6
+ def discard?(key); @discard.include?(key.to_s); end
11
7
  def keep?(key); !discard?(key); end
12
8
  end
13
9
 
14
- describe FlashController do
10
+ describe FlashController, type: :controller do
15
11
  it "should display flash message on redirect" do
16
- post :redirect, type: :notice, message: 'Glow!'
12
+ post :redirect, params: { type: :notice, message: 'Glow!' }
17
13
 
18
14
  flash[:notice].should be == 'Glow!'
19
15
  flash.keep?(:notice).should be true
20
16
  end
21
17
 
22
18
  it "should display flash message on xhr" do
23
- xhr :get, :ajax, type: :notice, message: 'Glow!'
19
+ get :ajax, params: { type: :notice, message: 'Glow!' }, xhr: true
24
20
 
25
21
  flash[:notice].should be == 'Glow!'
26
22
  flash.discard?(:notice).should be true
@@ -30,18 +26,18 @@ describe FlashController do
30
26
  end
31
27
 
32
28
  it "should handle unicode on xhr" do
33
- xhr :get, :ajax, type: :notice, message: 'utf8: ✓'
29
+ get :ajax, params: { type: :notice, message: 'utf8: ✓' }, xhr: true
34
30
  @response.headers['X-Message-Type'].should be == 'notice'
35
31
  HTMLEntities.new.decode(@response.headers['X-Message']).should be == 'utf8: ✓'
36
32
  end
37
33
 
38
34
  it "should not display flash message on xhr when skip_glow is set" do
39
- xhr :get, :ajax, type: :notice, message: 'utf8: ✓', skip_glow: true
35
+ get :ajax, params: { type: :notice, message: 'utf8: ✓', skip_glow: true }, xhr: true
40
36
  @response.headers.should_not have_key 'X-Message-Type'
41
37
  end
42
38
 
43
39
  it "should pass flash message on JSON requests" do
44
- get :ajax, type: :notice, message: 'Glow!', format: :json
40
+ get :ajax, params: { type: :notice, message: 'Glow!' }, format: :json
45
41
 
46
42
  flash[:notice].should be == 'Glow!'
47
43
  flash.discard?(:notice).should be true
@@ -51,7 +47,7 @@ describe FlashController do
51
47
  end
52
48
 
53
49
  it "should not pass flash message on XML requests" do
54
- get :ajax, type: :notice, message: 'Glow!', format: :xml
50
+ get :ajax, params: { type: :notice, message: 'Glow!' }, format: :xml
55
51
 
56
52
  @response.headers['X-Message-Type'].should be_nil
57
53
  @response.headers['X-Message'].should be_nil
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- gem 'rails', "~> 3.0.0"
2
+ gem 'rails'
3
3
  gem 'jquery-rails'
4
4
  gem 'glow', path: '../..'
5
5
  #group :test, :development do
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  require 'spec_helper'
3
3
 
4
- describe "the flash view" do
4
+ describe "the flash view", type: :feature do
5
5
  it "redirects" do
6
6
  visit root_path
7
7
  click_on 'redirect'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kirsch
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-19 00:00:00.000000000 Z
12
+ date: 2018-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.0
20
+ version: 4.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 3.0.0
27
+ version: 4.0.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: actionpack
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 3.0.0
34
+ version: 4.0.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 3.0.0
41
+ version: 4.0.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: jquery-rails
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -70,11 +70,9 @@ files:
70
70
  - README.md
71
71
  - Rakefile
72
72
  - glow.gemspec
73
- - lib/generators/glow/install/install_generator.rb
74
73
  - lib/glow.rb
75
74
  - lib/glow/engine.rb
76
75
  - lib/glow/filter.rb
77
- - lib/glow/railtie.rb
78
76
  - lib/glow/version.rb
79
77
  - spec/controllers/flash_controller_spec.rb
80
78
  - spec/dummy/.rspec
@@ -1,19 +0,0 @@
1
- require 'rails'
2
-
3
- module Glow
4
- module Generators
5
- class InstallGenerator < ::Rails::Generators::Base
6
-
7
- desc "This generator installs glow.js. You must inclu"
8
- class_option :ui, :type => :boolean, :default => false, :desc => "Include jQueryUI"
9
- source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
10
-
11
- def copy_glow
12
- say_status("copying", "glow", :green)
13
- copy_file "glow.js", "public/javascripts/glow.js"
14
- say("Please include glow.js in your layout")
15
- end
16
-
17
- end
18
- end
19
- end if ::Rails.version < "3.1"
@@ -1,13 +0,0 @@
1
- require 'glow/filter'
2
- require 'rails/railtie'
3
- require 'action_controller'
4
-
5
- module Glow
6
- class Railtie < Rails::Railtie
7
- initializer 'glow' do
8
- ActiveSupport.on_load :action_controller do
9
- include Glow::Filter
10
- end
11
- end
12
- end
13
- end