imageboss-rails 1.0.4 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d82c7ef115b80a091ae6b89adb2830778d52b83e821984ec64a4050a0160ac0
4
- data.tar.gz: a32c1db266969ead2f287af3350cd7ba646b73d7d35331c951dd53ef9d6c3a3b
3
+ metadata.gz: 3f8f345953b16b9516d8782f4aedeba2de339ec57aa57bd1f1cd53662a7b419f
4
+ data.tar.gz: 45ff2b66250454941d0157f3baf587f9c02ab1c3125a95238729694d2270d284
5
5
  SHA512:
6
- metadata.gz: 8593d8d94d5bef13719ba8ce655ae806c78e3f1e341a29fd42848f4113bb651ead8c23ec393ad4e42a83890f3912496aee1cc044699f814cf43172693abcf85a
7
- data.tar.gz: 40ae95015e70be29d42fedfb05caefe2413d6e2a7ae65f14734dbe2d7ebfe4be5b489cbf35b690ef02925c98f127131f335d0add3d40701d0a9d2274e4feffc3
6
+ metadata.gz: 7e7376c47ccb7607f297d0c5d021e085caefa376b02cafb043731f51775ab5927c7303ebd03327f7fdf9baeb4020da429ac737548bc215b613cba025823e8b8d
7
+ data.tar.gz: c30f201bc30d0ba5386194800536ad2b868905f7512fe849ace3c10eae861d359b6f847ab9d4b14587ecab18168c4b8dd8d0610cd576dda2b8b705ff926780d2
data/README.md CHANGED
@@ -11,17 +11,19 @@ to offer rails specific features.
11
11
  We recommend using something like [Paperclip](https://github.com/thoughtbot/paperclip), [Refile](https://github.com/refile/refile), [Carrierwave](https://github.com/carrierwaveuploader/carrierwave), or [s3_direct_upload](https://github.com/waynehoover/s3_direct_upload) to handle uploads and make them available. After they've been uploaded, you can then serve them using this gem or you can't disable ImageBoss for spacific environments. Read on.
12
12
 
13
13
  **Table of Contents**
14
- - [Installation](#installation)
15
- - [Usage](#usage)
16
- - [Configuration](#configuration)
17
- - [Same configuration across all environments](#same-configuration-across-all-environments)
18
- - [Environment specific configuration](#environment-specific-configuration)
19
- - [imageboss_tag](#imageboss_tag)
20
- - [Native Rails image_tag options](#native-rails-image_tag-options)
21
- - [imageboss_url](#imageboss_url)
22
- - [Usage in Sprockets](#usage-in-sprockets)
23
- - [Disable ImageBoss URL on specific environments](#disable-imageboss-url-on-specific-environments)
24
- - [Compatibility](#compatibility)
14
+ - [ImageBoss Helper for Ruby On Rails](#imageboss-helper-for-ruby-on-rails)
15
+ - [Installation](#installation)
16
+ - [Usage](#usage)
17
+ - [Configuration](#configuration)
18
+ - [Same configuration across all environments](#same-configuration-across-all-environments)
19
+ - [Environment specific configuration](#environment-specific-configuration)
20
+ - [imageboss_tag](#imagebosstag)
21
+ - [Native Rails image_tag options](#native-rails-imagetag-options)
22
+ - [imageboss_url](#imagebossurl)
23
+ - [Usage in Sprockets](#usage-in-sprockets)
24
+ - [Disable ImageBoss URL on specific environments](#disable-imageboss-url-on-specific-environments)
25
+ - [Compatibility](#compatibility)
26
+ - [Developer](#developer)
25
27
 
26
28
  ## Installation
27
29
  Just run the following:
@@ -43,14 +45,14 @@ Just add the following to `config/application.rb`:
43
45
 
44
46
  ```ruby
45
47
  Rails.application.configure do
46
- config.imageboss.asset_host = "https://assets.mywebsite.com"
48
+ config.imageboss.source = "mywebsite-assets"
47
49
  end
48
50
  ```
49
51
  #### Environment specific configuration
50
52
  Just add the following to `config/environments/production.rb`:
51
53
  ```ruby
52
54
  Rails.application.configure do
53
- config.imageboss.asset_host = "https://prod-assets.mywebsite.com"
55
+ config.imageboss.source = "mywebsite-assets-prod"
54
56
  end
55
57
  ```
56
58
 
@@ -64,7 +66,7 @@ Will output the following:
64
66
  ```html
65
67
  <img
66
68
  alt="my-nice-image"
67
- src="https://img.imageboss.me/cover/100x100/https://assets.mywebsite.com/assets/my-nice-image.jpg"
69
+ src="https://img.imageboss.me/mywebsite-assets/cover/100x100/assets/my-nice-image.jpg"
68
70
  />
69
71
  ```
70
72
 
@@ -77,7 +79,7 @@ Will output the following:
77
79
  ```html
78
80
  <img
79
81
  alt="Sunny Lisbon!"
80
- src="https://img.imageboss.me/cover/100x100/https://assets.mywebsite.com/assets/my-nice-image.jpg"
82
+ src="https://img.imageboss.me/mywebsite-assets/cover/100x100/assets/my-nice-image.jpg"
81
83
  />
82
84
  ```
83
85
 
@@ -88,7 +90,7 @@ Just like Rails' [asset_url](https://apidock.com/rails/ActionView/Helpers/AssetU
88
90
  ```
89
91
  Will output the following:
90
92
  ```
91
- https://img.imageboss.me/width/100/https://assets.mywebsite.com/assets/my-nice-image.jpg
93
+ https://img.imageboss.me/mywebsite-assets/width/100/assets/my-nice-image.jpg
92
94
  ```
93
95
 
94
96
  ### Usage in Sprockets
@@ -109,7 +111,7 @@ config.imageboss.enabled = false
109
111
  ```
110
112
  With this configured in all places you call `imageboss_url` or `imageboss_tag` the `src` or the `url` generated will fallback straight to your localhost images. For example instead of generating this URL:
111
113
  ```
112
- https://img.imageboss.me/cover/100x100/https://assets.mywebsite.com/assets/my-nice-image.jpg
114
+ https://img.imageboss.me/mywebsite-assets/cover/100x100/assets/my-nice-image.jpg
113
115
  ```
114
116
  it will output this:
115
117
  ```
@@ -119,10 +121,12 @@ This is nice because you won't need to add any extra code to handle this yoursel
119
121
 
120
122
  ## Compatibility
121
123
  Rails
124
+ - 6
122
125
  - 5
123
126
  - 4
124
127
 
125
128
  Ruby
129
+ - 2.6.x
126
130
  - 2.4.x
127
131
  - 2.3.x
128
132
  - 2.2.x
@@ -133,3 +137,10 @@ jRuby
133
137
 
134
138
  Rubinius
135
139
  - rbx-3.x
140
+
141
+
142
+ ## Developer
143
+ To run the tests:
144
+ ```
145
+ ./bin/test
146
+ ```
@@ -5,7 +5,7 @@ module ImageBoss
5
5
 
6
6
  def imageboss_url(path, operation, options)
7
7
  imageboss_client
8
- .path(image_path(path))
8
+ .path(path)
9
9
  .operation(operation, options)
10
10
  .html_safe
11
11
  end
@@ -15,7 +15,7 @@ module ImageBoss
15
15
  def imageboss_client
16
16
  config = ::ImageBoss::Rails.config.imageboss || {}
17
17
  client_options = {}
18
- client_options[:domain] = config[:asset_host]
18
+ client_options[:source] = config[:source]
19
19
  client_options[:enabled] = config[:enabled] unless config[:enabled].nil?
20
20
  @imageboss_client = ::ImageBoss::Client.new(**client_options)
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module ImageBoss
2
2
  module Rails
3
- VERSION = '1.0.4'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imageboss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Escobar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-24 00:00:00.000000000 Z
11
+ date: 2020-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imageboss-rb
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.2
19
+ version: 2.0.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: 1.0.2
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 6.0.2
33
+ version: 5.0.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 6.0.2
40
+ version: 5.0.2
41
41
  description: Official Ruby On Rails gem for generating ImageBoss URLs
42
42
  email:
43
43
  - igor@imageboss.me
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.1.2
76
+ rubygems_version: 3.0.6
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Generate ImageBoss URLs with Ruby on Rails