@bigbinary/neeto-image-uploader-frontend 1.4.2 → 1.4.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.
- package/README.md +6 -21
- package/dist/index.cjs.js +1062 -922
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1063 -923
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/types.d.ts +17 -2
package/README.md
CHANGED
|
@@ -35,27 +35,19 @@
|
|
|
35
35
|
end
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
2.
|
|
39
|
-
|
|
40
|
-
```ruby
|
|
41
|
-
gem "imagekitio"
|
|
42
|
-
|
|
43
|
-
gem "httparty"
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
3. Run the following command to install the engine:
|
|
38
|
+
2. Run the following command to install the engine:
|
|
47
39
|
|
|
48
40
|
```shell
|
|
49
41
|
bundle install
|
|
50
42
|
```
|
|
51
43
|
|
|
52
|
-
|
|
44
|
+
3. Add the following line to your application's `config/routes.rb`:
|
|
53
45
|
|
|
54
46
|
```ruby
|
|
55
47
|
mount NeetoImageUploaderEngine::Engine => "/neeto_image_uploader_engine"
|
|
56
48
|
```
|
|
57
49
|
|
|
58
|
-
|
|
50
|
+
4. Add the following keys to environment variables (all 6 keys are required):
|
|
59
51
|
|
|
60
52
|
```zsh
|
|
61
53
|
IMAGE_KIT_PUBLIC_KEY
|
|
@@ -66,7 +58,7 @@
|
|
|
66
58
|
UNSPLASH_ACCESS_KEY #(for fetching images from unsplash)
|
|
67
59
|
```
|
|
68
60
|
|
|
69
|
-
|
|
61
|
+
5. Add the following lines to `secrets.yml`:
|
|
70
62
|
|
|
71
63
|
```yml
|
|
72
64
|
image_kit_public_key: <%= ENV["IMAGE_KIT_PUBLIC_KEY"] %>
|
|
@@ -76,7 +68,7 @@
|
|
|
76
68
|
unsplash_access_key: <%= ENV["UNSPLASH_ACCESS_KEY"] %>
|
|
77
69
|
```
|
|
78
70
|
|
|
79
|
-
|
|
71
|
+
6. Add the folowing linse in `application_helper.rb` inside `app/helpers` folder:
|
|
80
72
|
|
|
81
73
|
```ruby
|
|
82
74
|
module ApplicationHelper
|
|
@@ -91,19 +83,12 @@
|
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
85
|
|
|
94
|
-
global_props.deep_merge!(
|
|
95
|
-
{
|
|
96
|
-
organization: {
|
|
97
|
-
subdomain: @organization.subdomain
|
|
98
|
-
}
|
|
99
|
-
}) # only required if organization subdomain information is not present in globalProps
|
|
100
|
-
|
|
101
86
|
global_props.deep_merge!(image_kit_props)
|
|
102
87
|
end
|
|
103
88
|
end
|
|
104
89
|
```
|
|
105
90
|
|
|
106
|
-
|
|
91
|
+
7. Add the following file `imagekitio.rb` inside `config/initializers`
|
|
107
92
|
|
|
108
93
|
```ruby
|
|
109
94
|
# frozen_string_literal: true
|