redditor 0.1.20 → 0.1.22

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: 7c68ce66865451f834f66beee9c6193596e531e2
4
- data.tar.gz: c8823f6ab7f104dcc82775ba0044af6a283bb407
3
+ metadata.gz: 47dda44b37609e7e7c8def17cbe1d8c86539b4ac
4
+ data.tar.gz: 6991a2f0af8af0d4683b524f155702331872a0fe
5
5
  SHA512:
6
- metadata.gz: bd161078d41fcaebd80cd645e7516f2c39e26d2ad5bd0fe978c4c517ceea6eaded89f9a82d53c25951f342dcee4c94dc45550b6a70ee7841a197ef2fdbe365fc
7
- data.tar.gz: fe4bd27da0c9c615678fcddbaedcb766fe5e0e93aac98981d2c04a0fc99c8eb640ed779bca87a65bb0ee8401d1c1659f81852e48a918eb98041b111a22a9156a
6
+ metadata.gz: cbaf37b436b925d9b35431d839a6d1bfa0bc9f1366f9918c95926ea8fe74a7ca129a4c0823d5a4b476a8b8327d2a57ee14a396c9ea7960e960df6ab7779d9beb
7
+ data.tar.gz: e9dec8932de03d8e50e8dc22adb325c3be5760650602e54563cc299c3155e339022d61402d03ddaf0afe08192ad8ef067fb5219e7483334b298f962ae4a87ae7
@@ -1,18 +1,12 @@
1
1
  module Redditor
2
2
  class Image < ActiveRecord::Base
3
3
  self.table_name = "redditor_images"
4
-
5
- after_initialize :set_default_values # чтобы файл загружался, пока через html5 не передаем позицию
6
-
7
4
  attr_accessor :object_id
8
-
9
- mount_uploader :src, RedditorUploader
10
-
11
- validates :src, presence: true
12
-
13
5
  belongs_to :imageable, polymorphic: true, touch: true
14
-
6
+ validates :src, presence: true
7
+ mount_uploader :src, RedditorUploader
15
8
  default_scope -> { order(:position) }
9
+ after_initialize :set_default_values # чтобы файл загружался, пока через html5 не передаем позицию
16
10
 
17
11
  def self.model_name
18
12
  ActiveModel::Name.new(self, nil, 'Image')
@@ -23,8 +17,9 @@ module Redditor
23
17
  end
24
18
 
25
19
  private
26
- def set_default_values
27
- self.position ||= 1000
28
- end
20
+
21
+ def set_default_values
22
+ self.position ||= 1000
23
+ end
29
24
  end
30
- end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module Redditor
2
- VERSION = "0.1.20"
2
+ VERSION = "0.1.22"
3
3
  end
data/redditor.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "rails", "~> 4.1.6"
22
+ s.add_dependency "rails", "~> 4"
23
23
 
24
24
  s.add_runtime_dependency 'carrierwave'
25
25
  s.add_runtime_dependency 'mini_magick'
@@ -38,4 +38,5 @@ Gem::Specification.new do |s|
38
38
  s.add_development_dependency "guard-rspec"
39
39
  s.add_development_dependency 'generator_spec'
40
40
  s.add_development_dependency "factory_girl_rails"
41
+ s.add_development_dependency "launchy"
41
42
  end
@@ -13,6 +13,7 @@ Dummy::Application.configure do
13
13
  # Full error reports are disabled and caching is turned on.
14
14
  config.consider_all_requests_local = false
15
15
  config.action_controller.perform_caching = true
16
+ config.active_record.raise_in_transactional_callbacks = true
16
17
 
17
18
  # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
19
  # Add `rack-cache` to your Gemfile before enabling this.
@@ -20,7 +21,7 @@ Dummy::Application.configure do
20
21
  # config.action_dispatch.rack_cache = true
21
22
 
22
23
  # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
24
+ config.serve_static_files = false
24
25
 
25
26
  # Compress JavaScripts and CSS.
26
27
  config.assets.js_compressor = :uglifier
@@ -11,9 +11,10 @@ Dummy::Application.configure do
11
11
  # just for the purpose of running a single test. If you are using a tool that
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
+ config.active_record.raise_in_transactional_callbacks = true
14
15
 
15
16
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
17
+ config.serve_static_files = true
17
18
  config.static_cache_control = "public, max-age=3600"
18
19
 
19
20
  # Show full error reports and disable caching.
@@ -18,7 +18,6 @@ describe "Text block" do
18
18
  def delete_block() find("a.redditor__delete").click; end
19
19
 
20
20
  it "Saves text block to article", type: :feature, js: true do
21
- pending
22
21
  add_block
23
22
  show_text_area
24
23
  find(".redditor__textarea").set("test text block")
@@ -49,7 +48,6 @@ describe "Text block" do
49
48
  end
50
49
 
51
50
  it "Saves text block to article on save button", type: :feature, js: true do
52
- pending
53
51
  add_block
54
52
  show_text_area
55
53
  find("textarea").set("test text block")
@@ -49,4 +49,4 @@ describe "Video block" do
49
49
  visit_article
50
50
  wait_until { expect(page.find("iframe").nil?).to eq false }
51
51
  end
52
- end
52
+ end
data/spec/rails_helper.rb CHANGED
@@ -18,7 +18,7 @@ Capybara.default_wait_time = ENV['CAPYBARA_WAIT_TIME'].present? ? ENV['CAPYBARA_
18
18
  Capybara.register_driver :poltergeist do |app|
19
19
  Capybara::Poltergeist::Driver.new(app, {
20
20
  debug: false,
21
- phantomjs_options: ['--load-images=no', '--disk-cache=false'],
21
+ # phantomjs_options: ['--load-images=no', '--disk-cache=false'],
22
22
  js_errors: false
23
23
  })
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Bovykin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-25 00:00:00.000000000 Z
12
+ date: 2015-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 4.1.6
20
+ version: '4'
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: 4.1.6
27
+ version: '4'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: carrierwave
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -249,6 +249,20 @@ dependencies:
249
249
  - - ">="
250
250
  - !ruby/object:Gem::Version
251
251
  version: '0'
252
+ - !ruby/object:Gem::Dependency
253
+ name: launchy
254
+ requirement: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - ">="
257
+ - !ruby/object:Gem::Version
258
+ version: '0'
259
+ type: :development
260
+ prerelease: false
261
+ version_requirements: !ruby/object:Gem::Requirement
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: '0'
252
266
  description: Advanced page editor from redde
253
267
  email:
254
268
  - oleg.bovykin@gmail.com
@@ -435,7 +449,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
435
449
  version: '0'
436
450
  requirements: []
437
451
  rubyforge_project:
438
- rubygems_version: 2.2.2
452
+ rubygems_version: 2.4.6
439
453
  signing_key:
440
454
  specification_version: 4
441
455
  summary: Page editor