paperweight 0.1.0 → 0.1.1

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: c257b89200e21b312d6e80618546a84263d2f4d87408d07e2ae1d9bb86b2935b
4
- data.tar.gz: 30997e5c1c095e24ba48ee655c8ca7f487a741c0687858d9e991c75730c3cb90
3
+ metadata.gz: 1a1814e73458621f443eec5f8beb33927b86fd0a87646dee35a7fbe2a44db878
4
+ data.tar.gz: 3da40951af3ab3f0f5bd847b1a3d18afdfb31a7a94e8b43e4754e9f12dd45948
5
5
  SHA512:
6
- metadata.gz: 1e63cb06b6c8257719e098666b220f04499d119e0dfa016c9054e8802d742933053bc6935c5f2b19084b4e84d9d8973a1586e80070a5e794b446ef81f3dd8648
7
- data.tar.gz: 50048131ed8ad3430c886e2fc633730b3351777131bcac59b9b78e5ebb16c5e96ffcda5e72f148d078140d9e5cefa0176963ecbe5a4fd58199ad04fef2d5d57d
6
+ metadata.gz: 7addcabe6d4ec3d50f353002919c9cb82876931358b5dcf9749d40ba4f2d02d9333e3a81def3a8271ec12e3d3b294e9f1436f9f5fda501150ef6026d8d16316d
7
+ data.tar.gz: e035268def739e70c5fa8b065aa224f2283819e1df8b48f103ec82fd1d47bc43a8d7439980348db1f01d76b3f982d92a9208579abcfa58bae4a4376eeb62d477
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paperweight (0.1.0)
4
+ paperweight (0.1.1)
5
5
  paperclip (~> 6.0)
6
6
  rails (~> 5.2)
7
7
 
@@ -79,7 +79,7 @@ GEM
79
79
  mini_portile2 (2.3.0)
80
80
  minitest (5.11.3)
81
81
  nio4r (2.3.1)
82
- nokogiri (1.8.2)
82
+ nokogiri (1.8.3)
83
83
  mini_portile2 (~> 2.3.0)
84
84
  paperclip (6.0.0)
85
85
  activemodel (>= 4.2.0)
@@ -134,7 +134,7 @@ GEM
134
134
  json (>= 1.8, < 3)
135
135
  simplecov-html (~> 0.10.0)
136
136
  simplecov-html (0.10.2)
137
- sprockets (3.7.1)
137
+ sprockets (3.7.2)
138
138
  concurrent-ruby (~> 1.0)
139
139
  rack (> 1, < 3)
140
140
  sprockets-rails (3.2.1)
data/README.md CHANGED
@@ -22,7 +22,17 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- Configure `Paperclip` as you normally would, according to their docs. Then, add the ability to update the `*_url` attribute from the controller, where the `*` is the name of the attachment that you specified in your model's call to `has_attached_file`.
25
+ Configure `Paperclip` as you normally would, according to their docs. Then, add an additional `*_processing` boolean field to the model for which you want to process attachments in the background, where `*` is the name of the attachment that you specified in your model's call to `has_attached_file`.
26
+
27
+ ```ruby
28
+ class AddImageProcessingToPosts < ActiveRecord::Migration[5.2]
29
+ def change
30
+ add_column :posts, :image_processing, :boolean
31
+ end
32
+ end
33
+ ```
34
+
35
+ Then, add the ability to update the `*_url` attribute from the controller.
26
36
 
27
37
  ```ruby
28
38
  class PostsController < ApplicationController
@@ -45,6 +45,7 @@ module Paperweight
45
45
  define_method(name.url_eq) do |value|
46
46
  instance_variable_set(name.url_attr, value)
47
47
  self[name.processing] = value ? true : false
48
+ self.updated_at = Time.now if value
48
49
  end
49
50
  end
50
51
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paperweight
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperweight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Deisz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paperclip