fly_admin 0.0.2 → 0.0.3
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 +4 -4
- data/app/controllers/fly_admin/footers_controller.rb +2 -2
- data/app/helpers/fly_admin/footers_helper.rb +3 -1
- data/app/views/fly_admin/categories/_form.html.haml +3 -3
- data/app/views/layouts/fly_admin/_error_flash_message.html.haml +7 -0
- data/app/views/layouts/fly_admin/_flash_messages.html.haml +2 -3
- data/lib/fly_admin/connection_api.rb +3 -8
- data/lib/fly_admin/page_cache.rb +3 -0
- data/lib/fly_admin/version.rb +1 -1
- data/lib/fly_admin.rb +1 -1
- metadata +3 -6
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04a96b71887cfc1d39a76501710f129f0d13ccef
|
4
|
+
data.tar.gz: 1d43ec3a9d1ad992fdcd36af89edb6daa07dd568
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9a69f55da46dcd568f96dbea5e4969c7d596d830c2bd95f56c8cf66fd88954442f0f32b84dbada2fa7f73c889686197e7f5b6f8e2ad20206ccdfb7ed282f7d0
|
7
|
+
data.tar.gz: a8884e6b81f41b983251cc52aee2e1c0398e475846eac2fc603d6f0a4dffe02c5481bb282617ca3317076e9f9bb8265c78e4701f3f58954df92eca0b20f54988
|
@@ -13,7 +13,7 @@
|
|
13
13
|
= nested_form_for(category, :html => {:class => 'smart-form', :multipart => true}) do |f|
|
14
14
|
- if category.errors.any?
|
15
15
|
- category.errors.full_messages.each do |msg|
|
16
|
-
= render 'layouts/error_flash_message', msg: msg
|
16
|
+
= render 'layouts/fly_admin/error_flash_message', msg: msg
|
17
17
|
%section
|
18
18
|
.row
|
19
19
|
- if category.poster
|
@@ -54,7 +54,7 @@
|
|
54
54
|
= f.text_field :genre, placeholder: 'Жанр', class: 'margin-10 form-control input-sm'
|
55
55
|
%br
|
56
56
|
.widget-body.no-padding
|
57
|
-
%header
|
57
|
+
%header Общая информация
|
58
58
|
%table.table.table-bordered.margin-10.table-serials{style: 'width: 500px;'}
|
59
59
|
%thead
|
60
60
|
%tr
|
@@ -112,4 +112,4 @@
|
|
112
112
|
= link_to season_form.object.poster_url do
|
113
113
|
= image_tag season_form.object.poster_url, size: '100x100', class: 'margin-left-10'
|
114
114
|
%footer
|
115
|
-
= f.submit 'Сохранить', class: 'btn btn-primary'
|
115
|
+
= f.submit 'Сохранить', class: 'btn btn-primary'
|
@@ -13,13 +13,12 @@
|
|
13
13
|
×
|
14
14
|
%i.fa-fw.fa.fa-info
|
15
15
|
%strong К сведению:
|
16
|
-
= msg
|
17
16
|
- when "error"
|
18
|
-
= render 'layouts/error_flash_message', msg: msg
|
17
|
+
= render 'layouts/fly_admin/error_flash_message', msg: msg
|
19
18
|
- else
|
20
19
|
.alert.alert-info.fade.in
|
21
20
|
%button.close{"data-dismiss" => "alert"}
|
22
21
|
×
|
23
22
|
%i.fa-fw.fa.fa-info
|
24
23
|
%strong К сведению:
|
25
|
-
= msg
|
24
|
+
= msg
|
@@ -20,12 +20,8 @@ module FlyAdmin
|
|
20
20
|
def self.get_customer_params(params, request)
|
21
21
|
if ENV["RAILS_ENV"] == 'test' || ENV['TEST'].present? || Rails.env.eql?('test')
|
22
22
|
{ key: 'fun_key', alias: 'imbs_domain.com', action_type: 'wap', 'status' => 'ok', country: 'az'}
|
23
|
-
|
23
|
+
else
|
24
24
|
url = SiteConfig['wap_click_addr'] + '/api/handle_customer'
|
25
|
-
# if Rails.env.eql? 'development'
|
26
|
-
# url = 'http://0.0.0.0:3000' + '/api/handle_customer'
|
27
|
-
# request.env['REMOTE_ADDR'] = '83.149.34.187'
|
28
|
-
# end
|
29
25
|
request_params = self.make_customer_request_params(request, params)
|
30
26
|
if ENV['TEST']
|
31
27
|
request_params[:remote_addr] = '83.149.9.19'
|
@@ -37,12 +33,11 @@ module FlyAdmin
|
|
37
33
|
API_LOG.info "RESPONSE FROM IMBS: #{response.inspect}"
|
38
34
|
out_hash = JSON.parse(response)
|
39
35
|
out_hash.with_indifferent_access
|
40
|
-
rescue
|
36
|
+
rescue
|
41
37
|
API_LOG.error "response: #{response.inspect}"
|
42
38
|
{status: 'error'}
|
43
39
|
end
|
44
|
-
|
45
|
-
# end
|
40
|
+
end
|
46
41
|
end
|
47
42
|
|
48
43
|
def self.make_customer_request_params(request, params)
|
data/lib/fly_admin/page_cache.rb
CHANGED
@@ -34,8 +34,11 @@ module FlyAdmin
|
|
34
34
|
text
|
35
35
|
end
|
36
36
|
|
37
|
+
# After saving footer, clear cache and check if from imbs source(now - from db)
|
37
38
|
def clear_element(elem)
|
38
39
|
@rails_cache.delete_matched(elem)
|
40
|
+
new_text = check_footer(elem)
|
41
|
+
write_with_date(elem, new_text)
|
39
42
|
end
|
40
43
|
|
41
44
|
def write_with_date(elem, text)
|
data/lib/fly_admin/version.rb
CHANGED
data/lib/fly_admin.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fly_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ruslan Korolev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -955,6 +955,7 @@ files:
|
|
955
955
|
- app/views/fly_admin/videos/index.html.haml
|
956
956
|
- app/views/fly_admin/videos/new.html.erb
|
957
957
|
- app/views/fly_admin/videos/show.html.erb
|
958
|
+
- app/views/layouts/fly_admin/_error_flash_message.html.haml
|
958
959
|
- app/views/layouts/fly_admin/_flash_messages.html.haml
|
959
960
|
- app/views/layouts/fly_admin/_header.html.haml
|
960
961
|
- app/views/layouts/fly_admin/_left_panel.html.haml
|
@@ -1008,9 +1009,7 @@ files:
|
|
1008
1009
|
- test/dummy/config/locales/en.yml
|
1009
1010
|
- test/dummy/config/routes.rb
|
1010
1011
|
- test/dummy/config/secrets.yml
|
1011
|
-
- test/dummy/db/development.sqlite3
|
1012
1012
|
- test/dummy/db/schema.rb
|
1013
|
-
- test/dummy/log/development.log
|
1014
1013
|
- test/dummy/public/404.html
|
1015
1014
|
- test/dummy/public/422.html
|
1016
1015
|
- test/dummy/public/500.html
|
@@ -1088,9 +1087,7 @@ test_files:
|
|
1088
1087
|
- test/dummy/config/routes.rb
|
1089
1088
|
- test/dummy/config/secrets.yml
|
1090
1089
|
- test/dummy/config.ru
|
1091
|
-
- test/dummy/db/development.sqlite3
|
1092
1090
|
- test/dummy/db/schema.rb
|
1093
|
-
- test/dummy/log/development.log
|
1094
1091
|
- test/dummy/public/404.html
|
1095
1092
|
- test/dummy/public/422.html
|
1096
1093
|
- test/dummy/public/500.html
|
Binary file
|
@@ -1,10 +0,0 @@
|
|
1
|
-
[1m[36m (1.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
-
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
-
Migrating to CreateFlyAdminFooters (20150417075759)
|
6
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35m (20.3ms)[0m CREATE TABLE "fly_admin_footers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "unsubscription" text, "offer" text, "paysite_id" integer, "country_id" integer, "terms" text DEFAULT '', "created_at" datetime, "updated_at" datetime)
|
8
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150417075759"]]
|
9
|
-
[1m[35m (2.2ms)[0m commit transaction
|
10
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|