evil-front-rails 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +8 -0
- data/Rakefile +0 -4
- data/evil-front-rails.gemspec +4 -5
- data/lib/evil-front-rails.rb +0 -9
- data/lib/evil-front/rails/version.rb +1 -1
- metadata +4 -43
- data/.rspec +0 -1
- data/spec/app/.gitignore +0 -2
- data/spec/app/app/controllers/application_controller.rb +0 -2
- data/spec/app/app/controllers/helpers_controller.rb +0 -7
- data/spec/app/app/views/helpers/auto_flying_quotes.slim +0 -2
- data/spec/app/app/views/helpers/flying_quotes.slim +0 -2
- data/spec/app/app/views/helpers/head.slim +0 -2
- data/spec/app/app/views/helpers/library.slim +0 -2
- data/spec/app/app/views/helpers/russian_typograph.slim +0 -2
- data/spec/app/app/views/helpers/standard_assets.slim +0 -1
- data/spec/app/app/views/helpers/tel.slim +0 -1
- data/spec/app/app/views/helpers/typograph_by_locale.slim +0 -2
- data/spec/app/app/views/helpers/unstat.slim +0 -2
- data/spec/app/app/views/layouts/_statistics.erb +0 -1
- data/spec/app/app/views/layouts/head.slim +0 -4
- data/spec/app/config.ru +0 -2
- data/spec/app/config/application.rb +0 -11
- data/spec/app/config/boot.rb +0 -2
- data/spec/app/config/environment.rb +0 -2
- data/spec/app/config/environments/test.rb +0 -12
- data/spec/app/config/initializers/i18n.rb +0 -1
- data/spec/app/config/routes.rb +0 -3
- data/spec/app/config/secrets.yml +0 -3
- data/spec/helpers_spec.rb +0 -105
- data/spec/spec_helper.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 139de408fbd8ecc0418aca3907cdbaa21e4c9dac
|
4
|
+
data.tar.gz: af6e2d5afe0ec587620740801fff8b0e22e3fefa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbc020ade15bc5b963d1a8619b8a821e2ece71ec217ee094a4995b96181109e4afd480452ff69540efbb34b57a2585c17cf3dac365ada9314f8cb9c5db38b84f
|
7
|
+
data.tar.gz: f5273befed1cbc7da80b8b0a53391bbccd2200429032fe72ba791b4c9d993277f5906434bc97b857f09ddd7492b98f7b21a60dd7c0cc8d76abc2aeaddebd1dfc
|
data/ChangeLog.md
CHANGED
data/Rakefile
CHANGED
data/evil-front-rails.gemspec
CHANGED
@@ -20,9 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
min = EvilFront::Rails::VERSION.split('.')[0..1].concat(['0']).join('.')
|
21
21
|
s.add_runtime_dependency 'evil-front-all', "~> #{min}"
|
22
22
|
|
23
|
-
s.add_dependency 'rails',
|
24
|
-
s.add_dependency 'sass-rails',
|
25
|
-
s.add_dependency 'slim-rails',
|
26
|
-
s.add_dependency 'coffee-rails',
|
27
|
-
s.add_dependency 'ruby-clean-css', '>= 1'
|
23
|
+
s.add_dependency 'rails', '>= 3'
|
24
|
+
s.add_dependency 'sass-rails', '>= 3.2.6'
|
25
|
+
s.add_dependency 'slim-rails', '>= 1.1.0'
|
26
|
+
s.add_dependency 'coffee-rails', '>= 3.2.2'
|
28
27
|
end
|
data/lib/evil-front-rails.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
require 'evil-front-all'
|
2
2
|
|
3
|
-
require 'therubyracer'
|
4
|
-
require 'commonjs'
|
5
|
-
require 'ruby-clean-css/version'
|
6
|
-
require 'ruby-clean-css/exports'
|
7
|
-
require 'ruby-clean-css/compressor'
|
8
|
-
|
9
3
|
require 'sass-rails'
|
10
4
|
require 'slim-rails'
|
11
5
|
|
@@ -28,9 +22,6 @@ module EvilFront
|
|
28
22
|
if ::Rails.env.development?
|
29
23
|
app.config.sass.debug_info = true
|
30
24
|
end
|
31
|
-
|
32
|
-
app.config.assets.css_compressor = RubyCleanCSS::Compressor.new(
|
33
|
-
keep_special_comments: :none)
|
34
25
|
end
|
35
26
|
|
36
27
|
initializer 'evil_front.action_view' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evil-front-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Sitnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evil-front-all
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 3.2.2
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: ruby-clean-css
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '1'
|
97
83
|
description:
|
98
84
|
email: andrey@sitnik.ru
|
99
85
|
executables: []
|
@@ -101,37 +87,12 @@ extensions: []
|
|
101
87
|
extra_rdoc_files:
|
102
88
|
- LICENSE
|
103
89
|
files:
|
104
|
-
- ".rspec"
|
105
90
|
- ChangeLog.md
|
106
91
|
- LICENSE
|
107
92
|
- Rakefile
|
108
93
|
- evil-front-rails.gemspec
|
109
94
|
- lib/evil-front-rails.rb
|
110
95
|
- lib/evil-front/rails/version.rb
|
111
|
-
- spec/app/.gitignore
|
112
|
-
- spec/app/app/controllers/application_controller.rb
|
113
|
-
- spec/app/app/controllers/helpers_controller.rb
|
114
|
-
- spec/app/app/views/helpers/auto_flying_quotes.slim
|
115
|
-
- spec/app/app/views/helpers/flying_quotes.slim
|
116
|
-
- spec/app/app/views/helpers/head.slim
|
117
|
-
- spec/app/app/views/helpers/library.slim
|
118
|
-
- spec/app/app/views/helpers/russian_typograph.slim
|
119
|
-
- spec/app/app/views/helpers/standard_assets.slim
|
120
|
-
- spec/app/app/views/helpers/tel.slim
|
121
|
-
- spec/app/app/views/helpers/typograph_by_locale.slim
|
122
|
-
- spec/app/app/views/helpers/unstat.slim
|
123
|
-
- spec/app/app/views/layouts/_statistics.erb
|
124
|
-
- spec/app/app/views/layouts/head.slim
|
125
|
-
- spec/app/config.ru
|
126
|
-
- spec/app/config/application.rb
|
127
|
-
- spec/app/config/boot.rb
|
128
|
-
- spec/app/config/environment.rb
|
129
|
-
- spec/app/config/environments/test.rb
|
130
|
-
- spec/app/config/initializers/i18n.rb
|
131
|
-
- spec/app/config/routes.rb
|
132
|
-
- spec/app/config/secrets.yml
|
133
|
-
- spec/helpers_spec.rb
|
134
|
-
- spec/spec_helper.rb
|
135
96
|
homepage: https://github.com/ai/evil-front
|
136
97
|
licenses:
|
137
98
|
- MIT
|
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--format documentation --colour
|
data/spec/app/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
= standard_assets
|
@@ -1 +0,0 @@
|
|
1
|
-
= tel('+5 55', class: 'phone', data: { role: 'call' })
|
@@ -1 +0,0 @@
|
|
1
|
-
stat
|
data/spec/app/config.ru
DELETED
data/spec/app/config/boot.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
config.cache_classes = true
|
3
|
-
config.eager_load = false
|
4
|
-
config.serve_static_files = true
|
5
|
-
config.static_cache_control = 'public, max-age=3600'
|
6
|
-
config.consider_all_requests_local = true
|
7
|
-
config.action_controller.perform_caching = false
|
8
|
-
config.action_dispatch.show_exceptions = false
|
9
|
-
config.action_controller.allow_forgery_protection = false
|
10
|
-
config.active_support.test_order = :random
|
11
|
-
config.active_support.deprecation = :stderr
|
12
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
I18n.enforce_available_locales = false
|
data/spec/app/config/routes.rb
DELETED
data/spec/app/config/secrets.yml
DELETED
data/spec/helpers_spec.rb
DELETED
@@ -1,105 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require_relative 'spec_helper'
|
4
|
-
|
5
|
-
describe HelpersController, type: :controller do
|
6
|
-
render_views
|
7
|
-
|
8
|
-
describe 'flying_quotes' do
|
9
|
-
|
10
|
-
it 'accepts blocks' do
|
11
|
-
get :flying_quotes
|
12
|
-
expect(response).to be_success
|
13
|
-
expect(response.body).to eq '<span class="space-before-quote"> </span>' +
|
14
|
-
'<span class="quotes">«<b>text</b>»</span>'
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
describe 'auto_flying_quotes' do
|
20
|
-
|
21
|
-
it 'accepts blocks' do
|
22
|
-
get :auto_flying_quotes
|
23
|
-
expect(response).to be_success
|
24
|
-
expect(response.body).to eq '<b><span class="quotes">«a»</span></b>'
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'russian_typograph' do
|
30
|
-
|
31
|
-
it 'accepts blocks' do
|
32
|
-
get :russian_typograph
|
33
|
-
expect(response).to be_success
|
34
|
-
expect(response.body).to eq '<b>«<ф>»</b>'
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
describe 'typograph_by_locale' do
|
40
|
-
after do
|
41
|
-
I18n.locale = :en
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'accepts blocks' do
|
45
|
-
get :typograph_by_locale
|
46
|
-
expect(response).to be_success
|
47
|
-
expect(response.body).to eq '“a”'
|
48
|
-
end
|
49
|
-
|
50
|
-
it 'returns origin blocks on unknown locale' do
|
51
|
-
I18n.locale = :fr
|
52
|
-
get :typograph_by_locale
|
53
|
-
expect(response).to be_success
|
54
|
-
expect(response.body).to eq '"a"'
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
describe 'head_tag' do
|
60
|
-
before do
|
61
|
-
@env = Rails.env
|
62
|
-
end
|
63
|
-
|
64
|
-
after do
|
65
|
-
Rails.env = @env
|
66
|
-
end
|
67
|
-
|
68
|
-
it 'generates head tag content' do
|
69
|
-
get :head
|
70
|
-
expect(response).to be_success
|
71
|
-
expect(response.body).to eq '<head><meta charset="UTF-8" />' +
|
72
|
-
'<title>1</title><style>a {}</style></head>'
|
73
|
-
end
|
74
|
-
|
75
|
-
it 'adds statistics in production' do
|
76
|
-
Rails.env = ActiveSupport::StringInquirer.new('production')
|
77
|
-
get :head
|
78
|
-
expect(response).to be_success
|
79
|
-
expect(response.body).to eq '<head><meta charset="UTF-8" />' +
|
80
|
-
'<title>1</title>' +
|
81
|
-
"<style>a {}</style>stat\n</head>"
|
82
|
-
end
|
83
|
-
|
84
|
-
it 'ignores statistics on demand' do
|
85
|
-
Rails.env = ActiveSupport::StringInquirer.new('production')
|
86
|
-
get :unstat
|
87
|
-
expect(response).to be_success
|
88
|
-
expect(response.body).to eq '<head><meta charset="UTF-8" />' +
|
89
|
-
'<title>2</title></head>'
|
90
|
-
end
|
91
|
-
|
92
|
-
end
|
93
|
-
|
94
|
-
describe 'tel' do
|
95
|
-
|
96
|
-
it 'renders telephone link' do
|
97
|
-
get :tel
|
98
|
-
expect(response).to be_success
|
99
|
-
expect(response.body).to eq '<a class="tel phone" data-role="call" ' +
|
100
|
-
'href="tel:+555">+5 55</a>'
|
101
|
-
end
|
102
|
-
|
103
|
-
end
|
104
|
-
|
105
|
-
end
|