jets 1.3.0 → 1.3.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/lib/jets/commands/templates/skeleton/.gitignore +1 -3
- data/lib/jets/core.rb +5 -0
- data/lib/jets/generator/templates/rails/scaffold_controller/controller.rb +10 -2
- data/lib/jets/overrides/rails/asset_tag_helper.rb +9 -5
- data/lib/jets/poly_fun.rb +1 -1
- data/lib/jets/processors/main_processor.rb +1 -1
- data/lib/jets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abff40ad9616b0c4731fa910bab1fd95a04e6a18c231123ec25c7d5835a103f8
|
4
|
+
data.tar.gz: 9e3e1774accf6597b01a196ea8a7a2d02d8186fb2903a808295e6560c57a918c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c23d454c61f943ebb990c5dedb8e03212b4cda021fc0e54332bf796bbe7158b14048b75895b1c24df6610bb1e16357c7b9a03d4a25d22eaeb22f6e4066bb14b7
|
7
|
+
data.tar.gz: 7ba23f24ad9bb445f5ed7fcd9a2eee6e9243a2aaec515b0c66316148079d1abb20e10323bee0ed3935b9d6ea483b5c6c356c846475af82b886c7e14f800784bb
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.3.1]
|
7
|
+
- Merge pull request #87 from tongueroo/on-exception
|
8
|
+
- fix helpers for binary support
|
9
|
+
- deprecate report_exception in favor of on_exception
|
10
|
+
- docs: binary upload support
|
11
|
+
|
6
12
|
## [1.3.0]
|
7
13
|
- Official AWS Ruby Support
|
8
14
|
- Ruby Version 2.5.3 upgrade
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
PATH
|
12
12
|
remote: .
|
13
13
|
specs:
|
14
|
-
jets (1.3.
|
14
|
+
jets (1.3.1)
|
15
15
|
actionpack (>= 5.2.1)
|
16
16
|
actionview (>= 5.2.1)
|
17
17
|
activerecord (>= 5.2.1)
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
tzinfo (~> 1.1)
|
67
67
|
arel (9.0.0)
|
68
68
|
aws-eventstream (1.0.1)
|
69
|
-
aws-partitions (1.
|
69
|
+
aws-partitions (1.124.0)
|
70
70
|
aws-sdk-apigateway (1.23.0)
|
71
71
|
aws-sdk-core (~> 3, >= 3.39.0)
|
72
72
|
aws-sigv4 (~> 1.0)
|
data/README.md
CHANGED
data/lib/jets/core.rb
CHANGED
@@ -158,6 +158,11 @@ module Jets::Core
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def report_exception(exception)
|
161
|
+
puts "DEPRECATED: report_exception. Use on_exception instead.".colorize(:yellow)
|
162
|
+
on_exception(exception)
|
163
|
+
end
|
164
|
+
|
165
|
+
def on_exception(exception)
|
161
166
|
Jets::Turbine.subclasses.each do |subclass|
|
162
167
|
reporters = subclass.exception_reporters || []
|
163
168
|
reporters.each do |label, block|
|
@@ -29,7 +29,11 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
29
29
|
@<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %>
|
30
30
|
|
31
31
|
if @<%= orm_instance.save %>
|
32
|
-
|
32
|
+
if request.xhr?
|
33
|
+
render json: {success: true, location: url_for("/<%= plural_table_name %>/#@{<%= singular_table_name %>.id}")}
|
34
|
+
else
|
35
|
+
redirect_to "/<%= plural_table_name %>/#{@<%= singular_table_name %>.id}"
|
36
|
+
end
|
33
37
|
else
|
34
38
|
render :new
|
35
39
|
end
|
@@ -38,7 +42,11 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
38
42
|
# PUT <%= route_url %>/1
|
39
43
|
def update
|
40
44
|
if @<%= orm_instance.update("#{singular_table_name}_params") %>
|
41
|
-
|
45
|
+
if request.xhr?
|
46
|
+
render json: {success: true, location: url_for("/<%= plural_table_name %>/#@{<%= singular_table_name %>.id}")}
|
47
|
+
else
|
48
|
+
redirect_to "/<%= plural_table_name %>/#{@<%= singular_table_name %>.id}"
|
49
|
+
end
|
42
50
|
else
|
43
51
|
render :edit
|
44
52
|
end
|
@@ -23,9 +23,11 @@ module Jets::AssetTagHelper
|
|
23
23
|
#
|
24
24
|
# image_tag("jets.png") => https://s3-us-west-2.amazonaws.com/demo-dev-s3bucket-1kih4n2te0n66/jets/public/images/jets.png
|
25
25
|
def image_tag(source, options = {})
|
26
|
+
source = source.to_s # convert to String because passing a posts.photo object to results in failure to resolve the immage to a URL since we haven't defined polymorphic_url yet
|
27
|
+
|
26
28
|
# mimic original behavior to get /images in source
|
27
|
-
source = "/images/#{source}" unless source.starts_with?('/')
|
28
|
-
if on_aws?
|
29
|
+
source = "/images/#{source}" unless source.starts_with?('/') || source.starts_with?('http')
|
30
|
+
if on_aws? && !source.starts_with?('http')
|
29
31
|
source = "#{s3_public}#{source}"
|
30
32
|
end
|
31
33
|
|
@@ -33,9 +35,11 @@ module Jets::AssetTagHelper
|
|
33
35
|
end
|
34
36
|
|
35
37
|
def asset_path(source, options = {})
|
36
|
-
|
37
|
-
|
38
|
-
|
38
|
+
source = source.to_s # convert to String because passing a posts.photo object to results in failure to resolve the immage to a URL since we haven't defined polymorphic_url yet
|
39
|
+
# mimic original behavior to get /images in source
|
40
|
+
source = "/images/#{source}" unless source.starts_with?('/') || source.starts_with?('http')
|
41
|
+
|
42
|
+
if on_aws? && asset_folder?(source) && !source.starts_with?('http')
|
39
43
|
source = "#{s3_public}#{source}"
|
40
44
|
end
|
41
45
|
|
data/lib/jets/poly_fun.rb
CHANGED
data/lib/jets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|