brazify 0.1.0 → 0.2.0

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: 49482c7b0f14fb6dd9ada553cb0bc8e4b3d4c05ba1cfa069f7f89e82e5e80902
4
- data.tar.gz: 615d76b158f58d5f4e5e46ac3b71290c18da20c494ade26e278c93f62f7a0aff
3
+ metadata.gz: d5416cc59a3bd2a6575aa63657894a808a9d576c088070bb909b5480db40683b
4
+ data.tar.gz: bd762347c45c4370744225663254d28a113129eb3799cb6d23941fce600c2c10
5
5
  SHA512:
6
- metadata.gz: 61a4919709b8080974edb13f9d704b0f3f56be8562ad98051f70a0a1138e7199f00931975452d8b888b550dff3651cb41bb8e5a214a6b2634d1e036cc8fcf6d3
7
- data.tar.gz: 412919b807376deede91cb55dfccd78da98ec44a25017b86658724915f7d3d7295e5f4f6aaf007487d1f794d3e40e0a8ea42269ef03a71bb02d2a3b74ddbffd3
6
+ metadata.gz: ed62ad3e3a3136379df9cb9c97b8b497b54c9a3ba85f6ece6bff62092c6808385eebac764aae5fc40e308150f179a830bedf45c4181dda56be9d9062b36b44ba
7
+ data.tar.gz: 8443ed47d96c18e21d809c4bd296f30042b280295ae8a8fe5a47a95de8800d92c802437966063a8f1543ebb47aa97bb8c66745e9999544438cfb6a0c50678808
data/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Changelog
2
2
 
3
+
3
4
  ## [v0.1.0](https://github.com/Portify/brazify/tree/v0.1.0) (2021-11-12)
4
5
 
5
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brazify (0.1.0)
4
+ brazify (0.2.0)
5
5
  faraday (~> 1.8)
6
6
  faraday_middleware (~> 1.2)
7
7
 
data/README.md CHANGED
@@ -28,7 +28,17 @@ TODO: Write usage instructions here
28
28
 
29
29
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
30
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
31
+ To install this gem onto your local machine, run `bundle exec rake install`.
32
+
33
+ ### Releasing
34
+
35
+ To release a new version, run:
36
+ ```ruby
37
+ bin/release [major, minor, patch, <specific_version>]
38
+ ```
39
+ This will bump the version, create a git tag for the version and push git commits and tags.
40
+
41
+ The CI will then handle creating a github release, updating the changelog and publishing the `.gem` file to [rubygems.org](https://rubygems.org).
32
42
 
33
43
  ## Contributing
34
44
 
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bundler/setup'
4
- require 'brazify/brazify'
4
+ require 'brazify'
5
5
 
6
6
  @client = Brazify::Client.new
7
7
 
data/bin/release ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bash
2
+
3
+ green=`tput setaf 2`
4
+ yellow=`tput setaf 3`
5
+ reset=`tput sgr0`
6
+
7
+ echo -e "\n${yellow}Calculating versions${reset}"
8
+ set -x;
9
+ old_tag=$(git describe --tags --abbrev=0)
10
+ old_version="${old_tag//v}"
11
+
12
+ IFS=. read -r major minor patch <<EOF
13
+ $old_version
14
+ EOF
15
+
16
+ case "$1" in
17
+ major) new_version="$((major+1)).0.0"; ;;
18
+ minor) new_version="$major.$((minor+1)).0"; ;;
19
+ patch) new_version="$major.$minor.$((patch+1))"; ;;
20
+ *) new_version=$1
21
+ esac
22
+ set +x
23
+
24
+ echo -e "\n${yellow}Bumping brazify from version $old_version to $new_version${reset}"
25
+ (set -x; sed -i "" "s/$old_version/$new_version/g" "lib/brazify/version.rb")
26
+
27
+ echo -e "\n${yellow}Bundling with new version${reset}"
28
+ (set -x; bundle exec bundle install > /dev/null)
29
+
30
+ echo -e "\n${yellow}Staging lib/brazify/version.rb and Gemfile.lock${reset}"
31
+ (set -x; git add lib/brazify/version.rb && git add Gemfile.lock)
32
+
33
+ echo -e "\n${yellow}Creating commit${reset}"
34
+ (set -x; git commit -m "Bump brazify to $new_version")
35
+
36
+ echo -e "\n${yellow}Pushing commit to origin repo${reset}"
37
+ (set -x; git push origin)
38
+
39
+ echo -e "\n${yellow}Creating new tag v$new_version${reset}"
40
+ (set -x; git tag -am "tag v$new_version" "v$new_version")
41
+
42
+ echo -e "\n${yellow}Pushing tag to origin repo${reset}"
43
+ (set -x; git push origin --tags)
44
+
45
+ echo -e "\n${green}Yeah boi! v$new_version tagged and pushed. The CI will handle publishing to RubyGems${reset}"
File without changes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Brazify
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
@@ -3,16 +3,16 @@ require 'forwardable'
3
3
  require 'brazify/version'
4
4
  require 'brazify/configuration'
5
5
 
6
- module Brazify
7
- autoload :Client, 'brazify/client'
8
- autoload :Error, 'brazify/error'
9
- autoload :Resource, 'brazify/resource'
6
+ require 'brazify/client'
7
+ require 'brazify/error'
8
+ require 'brazify/resource'
10
9
 
11
- autoload :User, 'brazify/resources/user'
12
- autoload :Email, 'brazify/resources/email'
13
- autoload :Event, 'brazify/resources/event'
14
- autoload :Segment, 'brazify/resources/segment'
10
+ require 'brazify/resources/user'
11
+ require 'brazify/resources/email'
12
+ require 'brazify/resources/event'
13
+ require 'brazify/resources/segment'
15
14
 
15
+ module Brazify
16
16
  @config = Brazify::Configuration.setup
17
17
 
18
18
  class << self
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brazify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Bates, Maksim Fedotov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-16 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -165,9 +165,10 @@ files:
165
165
  - README.md
166
166
  - Rakefile
167
167
  - bin/console
168
+ - bin/release
168
169
  - bin/setup
169
- - braze-ruby.gemspec
170
- - lib/brazify/brazify.rb
170
+ - brazify.gemspec
171
+ - lib/brazify.rb
171
172
  - lib/brazify/client.rb
172
173
  - lib/brazify/configuration.rb
173
174
  - lib/brazify/error.rb