Skip to content

Commit

Permalink
Merge pull request #13 from simaofreitas/master
Browse files Browse the repository at this point in the history
Fix problem with ActiveSupport
  • Loading branch information
Justin McNally committed Apr 22, 2014
2 parents 32dd2fc + ebb6904 commit 97b818d
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 103 deletions.
14 changes: 2 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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
134 changes: 75 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,84 +1,100 @@
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

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)
Expand Down
40 changes: 9 additions & 31 deletions capistrano-slack.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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<capistrano>, ["~> 2.15.5"])
s.add_dependency(%q<capistrano-log_with_awesome>, ["~> 0.0.2"])
s.add_dependency(%q<activesupport>, [">= 3"])
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
s.add_development_dependency(%q<bundler>, [">= 1.0.9"])
s.add_development_dependency(%q<jeweler>, ["~> 1.8.0"])
s.add_development_dependency(%q<capistrano-spec>, [">= 0"])
s.add_development_dependency(%q<yard>, [">= 0"])
s.add_development_dependency(%q<bluecloth>, [">= 0"])

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<capistrano>, ["< 3.0.0"])
s.add_runtime_dependency(%q<capistrano-log_with_awesome>, ["~> 0.0.2"])
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
s.add_development_dependency(%q<bundler>, [">= 1.0.9"])
s.add_development_dependency(%q<jeweler>, ["~> 1.8.0"])
s.add_development_dependency(%q<capistrano-spec>, [">= 0"])
s.add_development_dependency(%q<yard>, [">= 0"])
s.add_development_dependency(%q<bluecloth>, [">= 0"])
else
s.add_dependency(%q<capistrano>, ["< 3.0.0"])
s.add_dependency(%q<capistrano-log_with_awesome>, ["~> 0.0.2"])
s.add_dependency(%q<rspec>, [">= 2.5.0"])
s.add_dependency(%q<bundler>, [">= 1.0.9"])
s.add_dependency(%q<jeweler>, ["~> 1.8.0"])
s.add_dependency(%q<capistrano-spec>, [">= 0"])
s.add_dependency(%q<yard>, [">= 0"])
s.add_dependency(%q<bluecloth>, [">= 0"])
end
else
s.add_dependency(%q<capistrano>, ["< 3.0.0"])
s.add_dependency(%q<capistrano-log_with_awesome>, ["~> 0.0.2"])
s.add_dependency(%q<rspec>, [">= 2.5.0"])
s.add_dependency(%q<bundler>, [">= 1.0.9"])
s.add_dependency(%q<jeweler>, ["~> 1.8.0"])
s.add_dependency(%q<capistrano-spec>, [">= 0"])
s.add_dependency(%q<yard>, [">= 0"])
s.add_dependency(%q<bluecloth>, [">= 0"])
end
end

3 changes: 2 additions & 1 deletion lib/capistrano/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +28,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)
Expand Down

0 comments on commit 97b818d

Please sign in to comment.