From 19ddd41e4be3a8436e8b6cb8a3d6a12c29a35a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sima=CC=83o=20Freitas?= Date: Fri, 18 Apr 2014 19:11:44 +0100 Subject: [PATCH 1/2] Fix problem with ActiveSupport --- lib/capistrano/slack.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/capistrano/slack.rb b/lib/capistrano/slack.rb index 2acb7dd..931a731 100644 --- a/lib/capistrano/slack.rb +++ b/lib/capistrano/slack.rb @@ -2,6 +2,7 @@ require 'capistrano/log_with_awesome' require 'json' require 'net/http' +require 'active_support/all' # TODO need to handle loading a bit beter. these would load into the instance if it's defined module Capistrano module Slack @@ -26,7 +27,7 @@ def self.extended(configuration) slack_application = fetch(:slack_application) || application slack_subdomain = fetch(:slack_subdomain) return if slack_token.nil? - announced_deployer = ActiveSupport::Multibyte::Chars.new(fetch(:deployer)).mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n,'').to_s + announced_deployer = ActiveSupport::Multibyte::Chars.new(fetch(:deployer)).mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/,'').to_s announced_stage = fetch(:stage, 'production') announcement = if fetch(:branch, nil) From ebb69044213250e8f5d0f864b99b606ef7e9d99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sima=CC=83o=20Freitas?= Date: Mon, 21 Apr 2014 23:40:48 +0100 Subject: [PATCH 2/2] Upgrade from gemcutter to rubygems & simplification of gem spec file --- Gemfile | 14 +--- Gemfile.lock | 134 ++++++++++++++++++++++----------------- capistrano-slack.gemspec | 40 +++--------- 3 files changed, 86 insertions(+), 102 deletions(-) diff --git a/Gemfile b/Gemfile index e14e812..fa75df1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,3 @@ -source :gemcutter +source 'https://rubygems.org' -gem "capistrano", "< 3.0.0" -gem "capistrano-log_with_awesome", "~> 0.0.2" - -group :development do - gem "rspec", ">= 2.5.0" - gem "bundler", ">= 1.0.9" - gem "jeweler", "~> 1.8.0" - gem "capistrano-spec" - gem "yard" - gem "bluecloth" # for README.markdown -end +gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 4fe0aa0..bcb7bad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,74 +1,92 @@ +PATH + remote: . + specs: + capistrano-slack (1.2.0) + activesupport (>= 3) + capistrano (~> 2.15.5) + capistrano-log_with_awesome (~> 0.0.2) + GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: + activesupport (4.1.0) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.1) + tzinfo (~> 1.1) + addressable (2.3.6) bluecloth (2.2.0) - capistrano (2.13.4) + builder (3.2.2) + capistrano (2.15.5) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) - capistrano-campfire (0.2.0) - capistrano - tinder capistrano-log_with_awesome (0.0.2) capistrano (>= 2.5.14) - capistrano-spec (0.1.0) - diff-lcs (1.1.3) - eventmachine (1.0.0) - faraday (0.8.4) - multipart-post (~> 1.1) - faraday_middleware (0.8.8) - faraday (>= 0.7.4, < 0.9) - git (1.2.5) - hashie (1.2.0) - highline (1.6.15) - http_parser.rb (0.5.3) - jeweler (1.8.4) + capistrano-spec (0.6.3) + diff-lcs (1.2.5) + faraday (0.8.9) + multipart-post (~> 1.2.0) + git (1.2.6) + github_api (0.10.1) + addressable + faraday (~> 0.8.1) + hashie (>= 1.2) + multi_json (~> 1.4) + nokogiri (~> 1.5.2) + oauth2 + hashie (2.1.1) + highline (1.6.21) + i18n (0.6.9) + jeweler (1.8.8) + builder bundler (~> 1.0) git (>= 1.2.5) + github_api (= 0.10.1) + highline (>= 1.6.15) + nokogiri (= 1.5.10) rake rdoc - jruby-pageant (1.1.1) - json (1.7.5) - mime-types (1.19) - multi_json (1.3.6) - multipart-post (1.1.5) - net-scp (1.0.4) - net-ssh (>= 1.99.1) - net-sftp (2.0.5) - net-ssh (>= 2.0.9) - net-ssh (2.6.0) - jruby-pageant (>= 1.1.1) - net-ssh-gateway (1.1.0) - net-ssh (>= 1.99.1) - rake (0.9.2.2) - rdoc (3.12) + json (1.8.1) + jwt (0.1.11) + multi_json (>= 1.5) + minitest (5.3.3) + multi_json (1.9.2) + multi_xml (0.5.5) + multipart-post (1.2.0) + net-scp (1.2.0) + net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (2.8.0) + net-ssh-gateway (1.2.0) + net-ssh (>= 2.6.5) + nokogiri (1.5.10) + oauth2 (0.9.3) + faraday (>= 0.8, < 0.10) + jwt (~> 0.1.8) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (~> 1.2) + rack (1.5.2) + rake (10.3.1) + rdoc (4.1.1) json (~> 1.4) - rspec (2.11.0) - rspec-core (~> 2.11.0) - rspec-expectations (~> 2.11.0) - rspec-mocks (~> 2.11.0) - rspec-core (2.11.1) - rspec-expectations (2.11.3) - diff-lcs (~> 1.1.3) - rspec-mocks (2.11.3) - simple_oauth (0.1.9) - tinder (1.9.1) - eventmachine (>= 0.12.0, < 2) - faraday (~> 0.8) - faraday_middleware (~> 0.8) - hashie (~> 1.0) - json (~> 1.6) - mime-types (~> 1.16) - multi_json (~> 1.0) - multipart-post (~> 1.1) - twitter-stream (~> 0.1) - twitter-stream (0.1.16) - eventmachine (>= 0.12.8) - http_parser.rb (~> 0.5.1) - simple_oauth (~> 0.1.4) - yard (0.8.3) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.8) + rspec-expectations (2.14.5) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.6) + thread_safe (0.3.3) + tzinfo (1.1.0) + thread_safe (~> 0.1) + yard (0.8.7.4) PLATFORMS ruby @@ -76,9 +94,7 @@ PLATFORMS DEPENDENCIES bluecloth bundler (>= 1.0.9) - capistrano - capistrano-campfire (~> 0.2.0) - capistrano-log_with_awesome (~> 0.0.2) + capistrano-slack! capistrano-spec jeweler (~> 1.8.0) rspec (>= 2.5.0) diff --git a/capistrano-slack.gemspec b/capistrano-slack.gemspec index bc34091..8760bdd 100644 --- a/capistrano-slack.gemspec +++ b/capistrano-slack.gemspec @@ -36,37 +36,15 @@ Gem::Specification.new do |s| s.rubygems_version = "1.8.23" s.summary = "Announce capistrano deploys to slack" - if s.respond_to? :specification_version then - s.specification_version = 3 + s.add_dependency(%q, ["~> 2.15.5"]) + s.add_dependency(%q, ["~> 0.0.2"]) + s.add_dependency(%q, [">= 3"]) + s.add_development_dependency(%q, [">= 2.5.0"]) + s.add_development_dependency(%q, [">= 1.0.9"]) + s.add_development_dependency(%q, ["~> 1.8.0"]) + s.add_development_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, [">= 0"]) + s.add_development_dependency(%q, [">= 0"]) - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, ["< 3.0.0"]) - s.add_runtime_dependency(%q, ["~> 0.0.2"]) - s.add_development_dependency(%q, [">= 2.5.0"]) - s.add_development_dependency(%q, [">= 1.0.9"]) - s.add_development_dependency(%q, ["~> 1.8.0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, ["< 3.0.0"]) - s.add_dependency(%q, ["~> 0.0.2"]) - s.add_dependency(%q, [">= 2.5.0"]) - s.add_dependency(%q, [">= 1.0.9"]) - s.add_dependency(%q, ["~> 1.8.0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, ["< 3.0.0"]) - s.add_dependency(%q, ["~> 0.0.2"]) - s.add_dependency(%q, [">= 2.5.0"]) - s.add_dependency(%q, [">= 1.0.9"]) - s.add_dependency(%q, ["~> 1.8.0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end end