jets 2.0.5 → 2.0.6

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: 123389cefd68a8b8a119f83358019cd456d76d181c42a320051a73e1c03c87e6
4
- data.tar.gz: d805927821c334310cdb8ae2c998f4e1b3ef87921a660d48dfc90e923789b595
3
+ metadata.gz: cdb8cb528f7e05335c066a9239d76b06a57b198cd2fce9fe653aa4a351f8b12b
4
+ data.tar.gz: d31c7c09ec2e31be38578d0bdfbeb8a687b3df47b0b728e8ab8e3f9e400bcaaf
5
5
  SHA512:
6
- metadata.gz: 80ffdd4a8cf53d311c0db441ca44d15acab2c107cb45f09e857bf9245b57b875ad6504ca65beebb55ae263484750681e737c6c66d513e4fc3701a3150d62a6e0
7
- data.tar.gz: e9a0be9ea49d69363426a161f07cfec13a0a9ca14f351a543f48c9589674d850a1e9ea9d147e712cdd50805eb8605ffde957b83d7a529904b70663f7c91ddee2
6
+ metadata.gz: 174ef5bc4919d1bb6b9ae6eba16dfdebbebfec44d0501750ada68dfc03fcd119a43de47f85acfbe9a198e3d32eb9b7303f20769f9672a56575e6367520394634
7
+ data.tar.gz: a540230d02d1570fffc08df01ea0f109994984f242afaf61bbec8d539e24c69996de533e048fff454a608dc32dfe2b7bafe1938bbf7e5d24db8f469c92a230cf
@@ -84,34 +84,6 @@ jobs:
84
84
 
85
85
  bundle exec rspec
86
86
 
87
- # commit_docs.sh requires this
88
- - run:
89
- name: configure git
90
- command: |
91
- git config --global user.email "tongueroo@gmail.com"
92
- git config --global user.name "Tung Nguyen"
93
-
94
- - run:
95
- name: commit cli reference docs
96
- command: |
97
- chmod a+x -R .circleci/bin
98
- .circleci/bin/commit_docs.sh
99
-
100
- - run:
101
- name: install awscli
102
- command: sudo apt-get update && sudo apt-get install -y awscli groff
103
-
104
- - run:
105
- name: configure awscli
106
- command: |
107
- mkdir ~/.aws
108
-
109
- cat >~/.aws/config <<EOL
110
- [default]
111
- region = ${AWS_REGION}
112
- output = json
113
- EOL
114
-
115
87
  # collect reports
116
88
  - store_test_results:
117
89
  path: /tmp/test-results
@@ -3,6 +3,9 @@
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/).
5
5
 
6
+ ## [2.0.6]
7
+ - #344 controller `helper_method` macro
8
+
6
9
  ## [2.0.5]
7
10
  - #333 Always keep vendor directory
8
11
  - #335 Controller action_name method
@@ -140,5 +140,11 @@ class Jets::Controller
140
140
  self.api_key_needed
141
141
  end
142
142
  end
143
+
144
+ def self.helper_method(*meths)
145
+ meths.each do |meth|
146
+ Jets::Router::Helpers.define_helper_method(meth)
147
+ end
148
+ end
143
149
  end
144
150
  end
@@ -1,5 +1,7 @@
1
1
  module Jets::Router::Helpers
2
2
  module CoreHelper
3
+ extend ActiveSupport::Concern
4
+
3
5
  # Used for form_for helper
4
6
  def polymorphic_path(record, _)
5
7
  url_for(record)
@@ -13,5 +15,13 @@ module Jets::Router::Helpers
13
15
  @_jets[:controller].send(meth)
14
16
  end
15
17
  end
18
+
19
+ class_methods do
20
+ def define_helper_method(name)
21
+ define_method(name) do
22
+ @_jets[:controller].send(name)
23
+ end
24
+ end
25
+ end
16
26
  end
17
27
  end
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  end
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: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-17 00:00:00.000000000 Z
11
+ date: 2019-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -538,7 +538,6 @@ executables:
538
538
  extensions: []
539
539
  extra_rdoc_files: []
540
540
  files:
541
- - ".circleci/bin/commit_docs.sh"
542
541
  - ".circleci/config.yml"
543
542
  - ".codebuild/README.md"
544
543
  - ".codebuild/bin/jets"
@@ -1,26 +0,0 @@
1
- #!/bin/bash -eux
2
-
3
- # Even though specs also generate docs, lets run again to ensure clean slate
4
- rake docs
5
-
6
- out=$(git status docs)
7
- if [[ "$out" = *"nothing to commit"* ]]; then
8
- exit
9
- fi
10
-
11
- COMMIT_MESSAGE="docs updated by circleci"
12
-
13
- # If the last commit already updated the docs, then exit.
14
- # Preventable measure to avoid infinite loop.
15
- if git log -1 --pretty=oneline | grep "$COMMIT_MESSAGE" ; then
16
- exit
17
- fi
18
-
19
- # If reach here, we have some changes on docs that we should commit.
20
- # Even though s
21
- git add docs
22
- git commit -m "$COMMIT_MESSAGE"
23
-
24
- # https://makandracards.com/makandra/12107-git-show-current-branch-name-only
25
- current_branch=$(git rev-parse --abbrev-ref HEAD)
26
- git push origin "$current_branch"