diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ac75539f7..2709cb9ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ active contributor to the hook file itself. You can annotate this directly in the hook like so: ```ruby -class Service::MyService < Service +class Service::MyService < Service::HttpPost string :project, :api_token # only include 'project' in the debug logs, skip the api token. @@ -81,7 +81,7 @@ You can test your service in a ruby irb console: # Hash of payload. {'blah' => 'payload!'}) - svc.receive_push + svc.receive_event ``` 3. The third argument is optional if you just want to use the sample @@ -92,7 +92,7 @@ You can test your service in a ruby irb console: # Hash of configuration information. {'token' => 'abc'}) - svc.receive_push + svc.receive_event ``` Other hook types diff --git a/Gemfile.lock b/Gemfile.lock index 081d817de..0d097a782 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,10 @@ PATH remote: . specs: - github-services (1.0.0.edf0e37) + github-services (1.0.0.8a56c1e) activeresource (~> 3.0.0) addressable (~> 2.2.7) - aws-sdk (~> 1.8.0) + aws-sdk (~> 1.27) faraday (= 0.8.7) httparty (= 0.7.4) mail (~> 2.3) @@ -12,8 +12,6 @@ PATH mime-types (~> 1.15) mqtt (= 0.0.8) oauth (= 0.4.4) - right_aws (= 3.0.3) - right_http_connection (= 1.3.0) ruby-hmac (= 0.4.0) softlayer_messaging (~> 1.0.2) tinder (= 1.8.0.github) @@ -34,7 +32,7 @@ GEM activesupport (= 3.0.20) activesupport (3.0.20) addressable (2.2.8) - aws-sdk (1.8.5) + aws-sdk (1.28.1) json (~> 1.4) nokogiri (>= 1.4.4) uuidtools (~> 2.1) @@ -43,26 +41,25 @@ GEM eventmachine (0.12.10) faraday (0.8.7) multipart-post (~> 1.1) - faraday_middleware (0.8.7) + faraday_middleware (0.9.0) faraday (>= 0.7.4, < 0.9) hashie (1.2.0) http_parser.rb (0.5.3) httparty (0.7.4) crack (= 0.1.8) i18n (0.5.0) - json (1.8.0) - jwt (0.1.6) - multi_json (>= 1.0) - mail (2.3.0) - i18n (>= 0.4.0) + json (1.8.1) + jwt (0.1.8) + multi_json (>= 1.5) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) mash (0.1.1) - mime-types (1.18) - mini_portile (0.5.1) + mime-types (1.25.1) + mini_portile (0.5.2) mqtt (0.0.8) - multi_json (1.3.2) - multipart-post (1.1.5) + multi_json (1.8.2) + multipart-post (1.2.0) nokogiri (1.6.0) mini_portile (~> 0.5.0) oauth (0.4.4) @@ -70,11 +67,8 @@ GEM rake (10.0.3) rest-client (1.6.7) mime-types (>= 1.16) - right_aws (3.0.3) - right_http_connection (>= 1.2.5) - right_http_connection (1.3.0) ruby-hmac (0.4.0) - simple_oauth (0.1.5) + simple_oauth (0.1.9) softlayer_messaging (1.0.2) rest-client tinder (1.8.0.github) @@ -88,20 +82,20 @@ GEM multi_json (~> 1.0) multipart-post (~> 1.1) twitter-stream (~> 0.1) - treetop (1.4.10) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) twilio-ruby (3.9.0) builder (>= 2.1.2) jwt (>= 0.1.2) multi_json (>= 1.3.0) - twitter-stream (0.1.15) + twitter-stream (0.1.16) eventmachine (>= 0.12.8) http_parser.rb (~> 0.5.1) simple_oauth (~> 0.1.4) uuidtools (2.1.4) xml-simple (1.0.11) - xmpp4r (0.5) + xmpp4r (0.5.5) xmpp4r-simple-19 (1.0.0) xmpp4r (>= 0.3.2) yajl-ruby (1.1.0) diff --git a/docs/amazonsns b/docs/amazonsns index 9bbaca8c9..298524508 100644 --- a/docs/amazonsns +++ b/docs/amazonsns @@ -1,13 +1,37 @@ Amazon Simple Notification Service ================================== -This service lets you publish event messages to Amazon's Simple Notification Service. Optionally, you can set up an Amazon SQS subscriber if 'sqs_queue' is specified. +This service lets you publish event messages to Amazon's Simple Notification Service. Please note that SNS Topics are region specific. -Install Notes -------------- +The AWS Key and Secret you proide can either be from your master account (not recommended) or from an IAM Resource. -1. 'aws_key' (REQUIRED) is the Amazon Access Key ID of an account with permission to publish SNS notifications. -2. 'aws_secret' (REQUIRED) is the Amazon Secret Access Key associated with the aws_key -3. 'sns_topic' (REQUIRED) is either the name of the Amazon SNS topic or the topic's ARN. If no topic exists by this name, one will be created. This service will not attempt to create the topic if the ARN is specified, thus allowing the minimum level of permissions (namely: 'sns:Publish') to be used. -4. 'sqs_queue' (OPTIONAL) is the name of an Amazon SQS Queue to be subscribed to the sns_topic. If no queue exists by this name, one will be created. +If using IAM, be sure to check that the user has the correct policies for publishing to the specified SNS Topic. A policy similar to the one below will provide your IAM Resource with the correct permission level. + +``` +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Sid": "Stmt0000000000000", + "Resource": [ + "arn:aws:sns:us-east-1:718656560584:app-deploy" + ], + "Effect": "Allow" + } + ] +} +``` + +This service will attempt to provide you with meaningful errors if your configuration is incorrect. + +1. 'aws_key' (Required) The access key to an Amazon Account or IAM User. + +2. 'aws_secret' (Required) The Amazon secret access key associated with the AWS Key. + +3. 'sns_topic' (Required) Full ARN path to the SNS Topic, ie. `arn:aws:sns:eu-west-1:718656560584:sns_topic_name` + +4. 'sns_region' (Optional) the identifier for the AWS Region that the SNS Topic is located in. This defaults to `us-east-1`. diff --git a/docs/awsopsworks b/docs/awsopsworks new file mode 100644 index 000000000..6fd891ef5 --- /dev/null +++ b/docs/awsopsworks @@ -0,0 +1,27 @@ +AWS OpsWorks +============ + +This service lets you deploy apps in AWS OpsWorks after pushing to the configured branch. + +You need to provide an AWS access key id and the corresponding secret access key having at least the permission for the `opsworks:CreateDeployment` action. That's the minimal required policy file: + +``` +{ + "Statement": [ + { + "Effect": "Allow", + "Action": "opsworks:CreateDeployment", + "Resource": "*" + } + ] +} +``` + +Install Notes +------------- + +1. **Stack Id** (required) - "OpsWorks ID" on the **stack setting page** in the AWS OpsWorks Console or see `StackId` at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Stack.html +2. **App Id** (required) - "OpsWorks ID" on the **app setting page** in the AWS OpsWorks Console or see `AppId` at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_App.html +3. **Branch Name** (required) - "Branch/Revision" configured for that app in the AWS OpsWorks Console or see `Revision` at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Source.html +4. **Aws Access Key Id** (required) - Access key id of an AWS IAM user having the permission for the `opsworks:CreateDeployment` action. +5. **Aws Secret Access Key** (required) - Corresponding secret access key of the AWS IAM user. diff --git a/docs/flowdock b/docs/flowdock index c279e7d67..6198c195c 100644 --- a/docs/flowdock +++ b/docs/flowdock @@ -1,10 +1,16 @@ Broadcast this project's commits, pull requests, issues, and their respective comments to Flowdock. - Install Notes ------------- API Token is a flow-specific token. You can find it either in the flow, or in Flowdock's Integrations help page at https://www.flowdock.com/help/integrations. Multiple flows may be specified with multiple comma-separated tokens. + + To include certain tags with every message, you can add tags to the tokens. Use + to separate tags. For example, "65f80e994031fcd80f57d1a9e294c1d1d+frontend+web,af8629b07978d1223c9d48d05ff1356+fyi" would add `frontend` and `web` tags to the messages posted to the first flow, and `fyi` to the messages posted to the second flow. + +Configure From Flowdock +----------------------- + + You can also configure hooks from within Flowdock. Those hooks will appear in the `Web Hooks` category of the service hooks. This can be done from the flow’s inbox settings. diff --git a/docs/gitter b/docs/gitter new file mode 100644 index 000000000..e3eb16bc8 --- /dev/null +++ b/docs/gitter @@ -0,0 +1,26 @@ +Gitter +====== + +Chat rooms for your public and private repos with awesome GitHub integration. + +https://gitter.im + +If you want to see detailed repo activity in your room, follow this steps: + + - Click the **Settings Cog** on the top right + - Click on **Integrations** + - Select **GitHub** + - Click on **configure manually** option + - Copy and paste the provided token here + +Install Notes +------------- + +1. **Token** - Gitter token for this repo + +Options + +2. **Mute Fork** - Mute fork notifications. +3. **Mute Watch** - Mute watch notifications. +4. **Mute Comments** - Mute issue and pull request comments. +5. **Mute Wiki** - Mute wiki changes. diff --git a/docs/notifo b/docs/notifo deleted file mode 100644 index d71f2079c..000000000 --- a/docs/notifo +++ /dev/null @@ -1,11 +0,0 @@ -Install Notes -------------- - -This service lets your broadcast your commits on Notifo, a mobile notifications platform. Get commit notifications on your iPhone and other mobile devices immediately via PUSH. - - - 1. Create a user account on Notifo at - 2. Type in your username and the usernames of others wanting to be notified of commits to this repository with Notifo into the subscribers field (comma separated). - 3. Enjoy. - -Notifications are only sent after the service (GitHub) has been approved to send you notifications on Notifo. This happens after the first commit after this service is enabled. You will begin receiving commit notifications from then on. \ No newline at end of file diff --git a/docs/obs b/docs/obs index 45a37b928..31205aad4 100644 --- a/docs/obs +++ b/docs/obs @@ -15,7 +15,7 @@ Install Notes # osc token --create You may already specify the package here - # osc token --create + # osc token --create _PROJECT_ _PACKAGE_ That means the token can only be used for this package. It also means you do not have to specify it in github.com. Just using the token is enough. diff --git a/docs/piwikplugins b/docs/piwikplugins new file mode 100644 index 000000000..5538dffc9 --- /dev/null +++ b/docs/piwikplugins @@ -0,0 +1,4 @@ +Piwik Plugins +============== + +Piwik is an open analytics platform which can be extended with Plugins and Themes. This service notifies the [Piwik Marketplace](http://plugins.piwik.org) of any new releases to your Piwik plugin. See [http://developer.piwik.org/guides/marketplace](the Publisher Guide) for more information. diff --git a/docs/sqsqueue b/docs/sqsqueue index 1c0ec30f4..75df0e15f 100644 --- a/docs/sqsqueue +++ b/docs/sqsqueue @@ -9,3 +9,7 @@ SqsQueue allows GitHub to send a notification to a queue inside your Amazon AWS 1. Configure your Amazon AWS account with an appropriately set up access-key/secret-key (Either parent account or IAM) that has permissions to perform 'SendMessage' operations. (https://console.aws.amazon.com/sqs/) +2. Aws SQS ARN is the unique code SQS references your queue with. It can be copied from the console + or fetched through the API. It takes the form of arn:aws:sqs:us-(region)-(dc):(id):(name). Copy and + paste the entire string. This hook parses the necessary details from the arn. + You may also specify a SQS Queue URL instead of an ARN if you want to use IAM or a Queue that was created using a different account. diff --git a/docs/versioneye b/docs/versioneye new file mode 100644 index 000000000..fc34d3a18 --- /dev/null +++ b/docs/versioneye @@ -0,0 +1,12 @@ +VersionEye is a notification system for software libraries. It notifies you about outdated dependencies in your repository and works currently for Ruby (Bundler), Python (Pypi), Node.JS (NPM), Java (Maven, Gradle), PHP (Composer) and Clojure (Lein). The integration for CocoaPods and Bower is on the way. + +This service hook will inform VersionEye every time you push to GitHub. On every push VersionEye will reparse your project file. + +Install Notes +------------- + +1. Sign up for free at http://www.VersionEye.com with your GitHub Account. +2. Go to https://www.versioneye.com/user/projects/github_repositories. +3. Select a repository that you want VersionEye to monitor for you. +4. Go to the project page and copy the project_id from the URL. +5. Here you will find your API Key https://www.versioneye.com/settings/api diff --git a/github-services.gemspec b/github-services.gemspec index 31a37cc03..786cf2bd4 100644 --- a/github-services.gemspec +++ b/github-services.gemspec @@ -48,18 +48,14 @@ Gem::Specification.new do |spec| # Twilio spec.add_dependency "twilio-ruby", "~> 3.9.0" - # Amazon SQS - spec.add_dependency "right_aws", "3.0.3" - spec.add_dependency "right_http_connection", "1.3.0" - # MQTT spec.add_dependency "mqtt", "0.0.8" # Softlayer Messaging spec.add_dependency "softlayer_messaging", "~> 1.0.2" - # Amazon SNS - spec.add_dependency "aws-sdk", "~> 1.8.0" + # Amazon SNS, Amazon SQS, AWS OpsWorks + spec.add_dependency "aws-sdk", "~> 1.27" spec.add_dependency "httparty", "0.7.4" spec.files = %w(Gemfile LICENSE README.mkdn CONTRIBUTING.md Rakefile) diff --git a/lib/github-services.rb b/lib/github-services.rb index dea11f2fe..deeffd418 100644 --- a/lib/github-services.rb +++ b/lib/github-services.rb @@ -26,8 +26,6 @@ require 'oauth' require 'yammer4r' require 'twilio-ruby' -require 'right_aws' -require 'right_http_connection' # vendor require 'basecamp' diff --git a/lib/services/amazon_sns.rb b/lib/services/amazon_sns.rb index ff467d905..0ed3d3401 100644 --- a/lib/services/amazon_sns.rb +++ b/lib/services/amazon_sns.rb @@ -2,44 +2,78 @@ require 'aws/sqs' class Service::AmazonSNS < Service - string :aws_key, :aws_secret, :sns_topic, :sqs_queue - white_list :aws_key, :sns_topic, :sqs_queue + + string :aws_key, :sns_topic, :sns_region + password :aws_secret - def receive_event - raise_config_error "Missing 'aws_key'" if data['aws_key'].to_s == '' - raise_config_error "Missing 'aws_secret'" if data['aws_secret'].to_s == '' - raise_config_error "Missing 'sns_topic'" if data['sns_topic'].to_s == '' + white_list :aws_key, :sns_topic, :sns_region - t = get_topic(data['sns_topic']) + url "http://aws.amazon.com/console" - if(data['sqs_queue'].to_s != '') - q = aws_sdk_sqs.queues.create(data['sqs_queue']) - t.subscribe(q) - end + maintained_by :github => "davidkelley" - t.publish(generate_json(payload)) + # Manage an event. Validate the data that has been received + # and then publish to SNS. + # + # Returns nothing. + def receive_event + validate_data + publish_to_sns(data, generate_json(payload)) end - attr_writer :aws_sdk_sqs - def aws_sdk_sqs - @aws_sdk_sqs ||= AWS::SQS.new(aws_config) - end + # Create a new SNS object using the AWS Ruby SDK and publish to it. + # cfg - Configuration hash of key, secret, etc. + # json - THe valid JSON payload to send. + # + # Returns the instantiated Amazon SNS Object + def publish_to_sns(cfg, json) + begin + # older version of AWS SDK does not support region configuration + # http://ruby.awsblog.com/post/TxVOTODBPHAEP9/Working-with-Regions + AWS.config(sns_endpoint: "sns.#{cfg['sns_region']}.amazonaws.com") + sns = AWS::SNS.new(config(cfg['aws_key'], cfg['aws_secret'])) + topic = sns.topics[cfg['sns_topic']] + topic.publish(json) + return sns - attr_writer :aws_sdk_sns - def aws_sdk_sns - @aws_sdk_sns ||= AWS::SNS.new(aws_config) + rescue AWS::SNS::Errors::AuthorizationError, + AWS::SNS::Errors::InvalidClientTokenId, + AWS::SNS::Errors::SignatureDoesNotMatch => e + raise_config_error e.message + rescue AWS::SNS::Errors::NotFound => e + raise_missing_error e.message + rescue SocketError + raise_missing_error + end end - def aws_config - {:access_key_id=>data['aws_key'], :secret_access_key=>data['aws_secret']} + # Build a valid AWS Configuration hash using the supplied + # parameters. + # + # Returns a valid AWS Config Hash. + def config(key, secret) + { + access_key_id: key, + secret_access_key: secret, + } end - def get_topic(name_or_arn) - if name_or_arn =~ /^arn:aws:sns:/ - aws_sdk_sns.topics[name_or_arn] - else - aws_sdk_sns.topics.create(name_or_arn) + # Validate the data that has been passed to the event. + # An AWS Key & Secret are required. As well as the ARN of an SNS topic. + # Defaults region to us-east-1 if not set. + # + # Returns nothing + def validate_data + if data['aws_key'].to_s.empty? || data['aws_secret'].to_s.empty? + raise_config_error "You need to provide an AWS Key and Secret Access Key" + end + + if data['sns_topic'].to_s.empty? || !data['sns_topic'].downcase.starts_with?('arn') + raise_config_error "You need to provide a full SNS Topic ARN" end + + data['sns_region'] = "us-east-1" if data['sns_region'].to_s.empty? end + end diff --git a/lib/services/apiary.rb b/lib/services/apiary.rb index 41d69d169..051ebd719 100644 --- a/lib/services/apiary.rb +++ b/lib/services/apiary.rb @@ -1,6 +1,7 @@ -class Service::Apiary < Service +class Service::Apiary < Service::HttpPost string :branch, :domain white_list :branch + default_events :push url "http://apiary.io" logo_url "http://static.apiary.io/css/design2/apiary-io-symbol-1x.png" @@ -26,7 +27,7 @@ def domain @domain ||= (not data['domain'].to_s.strip.empty?) ? data['domain'].to_s.strip : nil end - def receive_push + def receive_event return make_apiary_call end end diff --git a/lib/services/aws_ops_works.rb b/lib/services/aws_ops_works.rb new file mode 100644 index 000000000..114b0d4dd --- /dev/null +++ b/lib/services/aws_ops_works.rb @@ -0,0 +1,34 @@ +require 'aws/ops_works' + +class Service::AwsOpsWorks < Service::HttpPost + self.title = 'AWS OpsWorks' + + string :stack_id, # see StackId at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Stack.html + :app_id, # see AppId at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_App.html + :branch_name, # see Revision at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Source.html + :aws_access_key_id # see AWSAccessKeyID at http://docs.aws.amazon.com/opsworks/latest/APIReference/CommonParameters.html + password :aws_secret_access_key + + white_list :stack_id, + :app_id, + :branch_name, + :aws_access_key_id + + url "http://docs.aws.amazon.com/opsworks/latest/APIReference/API_CreateDeployment.html" + + def receive_event + create_deployment if branch_name == required_config_value('branch_name') + end + + def create_deployment + ops_works_client.create_deployment stack_id: required_config_value('stack_id'), + app_id: required_config_value('app_id'), + command: { name: 'deploy' } + end + + def ops_works_client + AWS::OpsWorks::Client.new access_key_id: required_config_value('aws_access_key_id'), + secret_access_key: required_config_value('aws_secret_access_key') + end + +end diff --git a/lib/services/flowdock.rb b/lib/services/flowdock.rb index 8a8fb8ad3..3229991f5 100644 --- a/lib/services/flowdock.rb +++ b/lib/services/flowdock.rb @@ -1,18 +1,22 @@ require 'uri' -class Service::Flowdock < Service - default_events :commit_comment, :gollum, :issues, :issue_comment, :pull_request, :push +class Service::Flowdock < Service::HttpPost + default_events :commit_comment, :gollum, :issues, :issue_comment, :pull_request, :push, :pull_request_review_comment string :token - def receive_event - raise_config_error "Missing token" if data['token'].to_s.empty? + url "https://www.flowdock.com" + logo_url "https://d2ph5hv9wbwvla.cloudfront.net/github/icon_220x140.png" + maintained_by email: "team@flowdock.com", github: 'Mumakil' + supported_by email: "support@flowdock.com", twitter: "@flowdock" - data['token'].to_s.split(",").each do |t| - token = URI.escape(t.to_s.gsub(/\s/, '')) + def receive_event + raw_token = required_config_value('token') + token = URI.escape(raw_token.to_s.gsub(/\s/, '')) + http.headers['X-GitHub-Event'] = event.to_s + deliver "https://api.flowdock.com/v1/github/#{token}" + end - http.headers['X-GitHub-Event'] = event.to_s - http.headers['content-type'] = 'application/json' - http_post "https://api.flowdock.com/v1/github/#{token}", generate_json(payload) - end + def original_body + payload end end diff --git a/lib/services/gitter.rb b/lib/services/gitter.rb new file mode 100644 index 000000000..9a5bc53f5 --- /dev/null +++ b/lib/services/gitter.rb @@ -0,0 +1,30 @@ +class Service::Gitter < Service::HttpPost + string :token + boolean :mute_fork, :mute_watch, :mute_comments, :mute_wiki + + default_events ALL_EVENTS + + url 'https://gitter.im' + logo_url 'https://gitter.im/_s/1/images/2/gitter/logo-blue-text.png' + + maintained_by github: 'malditogeek', + twitter: '@malditogeek' + + supported_by github: 'gitterHQ', + twitter: '@gitchat', + email: 'support@gitter.im' + + def receive_event + token = required_config_value('token') + raise_config_error 'Invalid token' unless token.match(/^\w+$/) + + return if data['mute_fork'] && event.to_s =~ /fork/ + return if data['mute_watch'] && event.to_s =~ /watch/ + return if data['mute_comments'] && event.to_s =~ /comment/ + return if data['mute_wiki'] && event.to_s =~ /gollum/ + + http.headers['X-GitHub-Event'] = event.to_s + + deliver "https://webhooks.gitter.im/e/#{token}" + end +end diff --git a/lib/services/hall.rb b/lib/services/hall.rb index ff35e287a..5f3657439 100644 --- a/lib/services/hall.rb +++ b/lib/services/hall.rb @@ -5,7 +5,7 @@ class Service::Hall < Service # Contributing Assets url "https://hall.com" - logo_url "https://hall.com/images/media_kit/hall_logo.jpg" + logo_url "https://s3.amazonaws.com/hall-production-assets/assets/media_kit/hall_logo-8b3fb6d39f78ad4b234e684f378b87b7.jpg" maintained_by :github => 'bhellman1' supported_by :web => 'https://hallcom.uservoice.com/', :email => 'contact@hall-inc.com', :twitter => 'hall' diff --git a/lib/services/irc.rb b/lib/services/irc.rb index e1c69d2c1..fe9ddbe82 100644 --- a/lib/services/irc.rb +++ b/lib/services/irc.rb @@ -179,7 +179,7 @@ def default_port end def port - data['port'] ? data['port'].to_i : default_port + data['port'].to_i > 0 ? data['port'].to_i : default_port end def url diff --git a/lib/services/irker.rb b/lib/services/irker.rb index de053994b..7978fad83 100644 --- a/lib/services/irker.rb +++ b/lib/services/irker.rb @@ -76,9 +76,7 @@ def build_irker_commit(repository, branch, sha1, commit, module_name) if file_string.size > 80 and files.size > 1 prefix = files[0] files.each do |file| - while not file.match prefix - prefix = prefix.rpartition("/")[0] - end + prefix = prefix.rpartition("/")[0] until file.match prefix end file_string = "#{prefix}/ (#{files.size} files)" end diff --git a/lib/services/notifo.rb b/lib/services/notifo.rb deleted file mode 100644 index b86368e25..000000000 --- a/lib/services/notifo.rb +++ /dev/null @@ -1,41 +0,0 @@ -class Service::Notifo < Service - string :subscribers - white_list :subscribers - - def receive_push - return if Array(payload['commits']).size == 0 - - subscribe_url = URI.parse('https://api.notifo.com/v1/subscribe_user') - http.basic_auth 'github', secrets['notifo']['apikey'] - http.url_prefix = "https://api.notifo.com/v1" - - subscribers = data['subscribers'].to_s - - if subscribers.empty? - raise_config_error "No subscribers: #{subscribers.inspect}" - return - end - - subscribers.gsub(/\s/, '').split(',').each do |subscriber| - http_post "subscribe_user", :username => subscriber - - commit = payload['commits'].last; - author = commit['author'] || {} - - if payload['commits'].length > 1 - extras = payload['commits'].length - 1 - http_post "send_notification", - 'to' => subscriber, - 'msg' => "#{author['name']}: \"#{commit['message'].slice(0,40)}\" (+#{extras} more commits)", - 'title' => "#{payload['repository']['name']}/#{ref_name}", - 'uri' => payload['compare'] - else - http_post "send_notification", - 'to' => subscriber, - 'msg' => "#{author['name']}: \"#{commit['message']}\"", - 'title' => "#{payload['repository']['name']}/#{ref_name}", - 'uri' => commit['url'] - end - end - end -end diff --git a/lib/services/redmine.rb b/lib/services/redmine.rb index 4090cff07..6417bfc8c 100644 --- a/lib/services/redmine.rb +++ b/lib/services/redmine.rb @@ -29,7 +29,9 @@ def receive_push issue_no = id.gsub('#','') # Send the commit information to the related issue on redmine - res = http_method :put, "#{data['address']}/issues/#{issue_no}.json" do |req| + http.url_prefix = data['address'] + + http_method :put, "/issues/#{issue_no}.json" do |req| req.headers['Content-Type'] = 'application/json' req.headers['X-Redmine-API-Key'] = data['api_key'] req.params['issue[notes]'] = commit_text(commit) diff --git a/lib/services/skydeskprojects.rb b/lib/services/skydeskprojects.rb index e81978454..6217d8280 100644 --- a/lib/services/skydeskprojects.rb +++ b/lib/services/skydeskprojects.rb @@ -15,11 +15,16 @@ class Service::SkyDeskProjects < Service::HttpPost def receive_push token = required_config_value('token') pId = required_config_value('project_id') - body = {'pId'=>pId, 'authtoken'=>token,:scope => 'projectsapi' , 'payload'=>payload} - body = generate_json(body) #http.headers['Authorization'] = "Token #{token}" - url = "https://projects.skydesk.jp/serviceHook" - deliver url + #url = "https://projects.skydesk.jp/serviceHook" + res = http_post "https://projects.skydesk.jp/serviceHook", + :pId => pId, + :authtoken => token, + :scope => "projectsapi", + :payload => generate_json(payload) + if res.status != 200 + raise_config_error + end end end diff --git a/lib/services/sqs_queue.rb b/lib/services/sqs_queue.rb index 3ae2cc29c..6a454d937 100644 --- a/lib/services/sqs_queue.rb +++ b/lib/services/sqs_queue.rb @@ -1,9 +1,12 @@ -class Service::SqsQueue < Service - string :aws_access_key, :sqs_queue_name +class Service::SqsQueue < Service::HttpPost + string :aws_access_key, :aws_sqs_arn password :aws_secret_key - white_list :aws_access_key, :sqs_queue_name + # NOTE: at some point, sqs_queue_name needs to be deprecated and removed + white_list :aws_access_key, :sqs_queue_name, :aws_sqs_arn + + maintained_by github: 'brycem', + twitter: 'brycemcd' - # receive_event() def receive_event return unless data && payload @@ -15,22 +18,27 @@ def receive_event raise_config_error "You must define an AWS secret key." end - if data['sqs_queue_name'].to_s.empty? - raise_config_error "You must define an SQS queue." + if data['sqs_queue_name'].to_s.empty? && data['aws_sqs_arn'].to_s.empty? + raise_config_error "You must define an SQS queue name or SQS queue ARN." end # Encode payload to JSON payload_json_data = generate_json(payload) # Send payload to SQS queue - notify_sqs( access_key(), secret_key(), queue_name(), payload_json_data ) + notify_sqs( access_key, secret_key, payload_json_data ) end - # notify_sqs() - # Note: If the queue does not exist, it is automatically created - def notify_sqs(aws_access_key, aws_secret_key, queue_name, payload) - sqs = RightAws::SqsGen2.new(aws_access_key, aws_secret_key) - queue = sqs.queue(queue_name) + def notify_sqs(aws_access_key, aws_secret_key, payload) + sqs = AWS::SQS.new( + access_key_id: access_key, + secret_access_key: secret_key, + region: region) + if data['aws_sqs_arn'] && data['aws_sqs_arn'].match(/^http/) + queue = sqs.queues[data['aws_sqs_arn']] + else + queue = sqs.queues.named(queue_name) + end queue.send_message(clean_for_json(payload)) end @@ -43,7 +51,26 @@ def secret_key end def queue_name - data['sqs_queue_name'].strip + arn[:queue_name] || data['sqs_queue_name'].strip + end + + def region + arn[:region] || 'us-east-1' end + private + + def arn + @arn ||= parse_arn + end + + def parse_arn + return {} unless data['aws_sqs_arn'] && !data['aws_sqs_arn'].match(/^http/) + _,_,service,region,id,queue_name = data['aws_sqs_arn'].split(":") + {service: service.strip, + region: region.strip, + id: id.strip, + queue_name: queue_name.strip + } + end end diff --git a/lib/services/versioneye.rb b/lib/services/versioneye.rb new file mode 100644 index 000000000..90a127f1d --- /dev/null +++ b/lib/services/versioneye.rb @@ -0,0 +1,26 @@ +class Service::Versioneye < Service::HttpPost + + string :api_key + string :project_id + + default_events :push + + url "http://www.VersionEye.com" + logo_url "https://www.VersionEye.com/images/versioneye_01.jpg" + + maintained_by :github => 'reiz' + supported_by :web => 'https://twitter.com/VersionEye', + :email => 'support@versioneye.com' + + def receive_event + http.headers['content-type'] = 'application/json' + project_id = data['project_id'].to_s.strip + api_key = data['api_key'].to_s.strip + domain = "https://www.versioneye.com" + endpoint = "/api/v2/github/hook/#{project_id}?api_key=#{api_key}" + url = "#{domain}#{endpoint}" + body = generate_json( payload ) + http_post url, "#{body}" + end + +end diff --git a/test/amazon_sns_test.rb b/test/amazon_sns_test.rb index 214fa0b43..aacb2d546 100644 --- a/test/amazon_sns_test.rb +++ b/test/amazon_sns_test.rb @@ -1,179 +1,67 @@ require File.expand_path('../helper', __FILE__) +class Hash + def except!(*keys) + keys.each { |key| delete(key) } + self + end +end + class AmazonSNSTest < Service::TestCase + #Use completely locked down IAM resource. def data { - 'aws_key' => 'k', - 'aws_secret' => 's', - 'sns_topic' => 't' - } + 'aws_key' => 'AKIAJV3OTFPCKNH53IBQ', + 'aws_secret' => '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', + 'sns_topic' => 'arn:aws:sns:us-east-1:718656560584:github-service-hook-test', + 'sns_region' => 'us-east-1' + } + end + + def payload + { + "test" => "true" + } end def test_event svc = service :push, data, payload - svc.aws_sdk_sns = aws_sns_stub - svc.aws_sdk_sqs = aws_sqs_stub + sns = svc.receive_event - svc.receive_event - - assert_nil svc.aws_sdk_sns.topics.topic_by_arn - assert_equal 1, svc.aws_sdk_sns.topics.topic.messages.size - assert_equal 'fakearn:t', svc.aws_sdk_sns.topics.topic.arn assert_equal data['aws_key'], svc.data['aws_key'] assert_equal data['aws_secret'], svc.data['aws_secret'] assert_equal data['sns_topic'], svc.data['sns_topic'] - + assert_equal data['sns_region'], svc.data['sns_region'] end - def test_event_with_topic_arn - data_copy = data.merge('sns_topic' => 'arn:aws:sns:us-east-1:111222333444:t') - svc = service :push, data_copy, payload - svc.aws_sdk_sns = aws_sns_stub - svc.aws_sdk_sqs = aws_sqs_stub - - svc.receive_event - - assert_nil svc.aws_sdk_sns.topics.topic - assert_equal 1, svc.aws_sdk_sns.topics.topic_by_arn.messages.size - assert_equal 'arn:aws:sns:us-east-1:111222333444:t', svc.aws_sdk_sns.topics.topic_by_arn.arn - assert_equal data_copy['aws_key'], svc.data['aws_key'] - assert_equal data_copy['aws_secret'], svc.data['aws_secret'] - assert_equal data_copy['sns_topic'], svc.data['sns_topic'] - - end - - def test_event_with_sqs_subscriber - - data_copy = data.clone - data_copy['sqs_queue'] = 'q' - - svc = service :push, data_copy, payload - svc.aws_sdk_sns = aws_sns_stub - svc.aws_sdk_sqs = aws_sqs_stub - - svc.receive_event - - assert_equal 1, svc.aws_sdk_sns.topics.topic.messages.size - assert_equal data_copy['sqs_queue'], svc.aws_sdk_sns.topics.topic.subscribers[0].name - assert_equal data_copy['aws_key'], svc.data['aws_key'] - assert_equal data_copy['aws_secret'], svc.data['aws_secret'] - assert_equal data_copy['sns_topic'], svc.data['sns_topic'] - assert_equal data_copy['sqs_queue'], svc.data['sqs_queue'] - + def verify_requires(svc) + assert_raise Service::ConfigurationError do + svc.receive_event + end end def test_requires_aws_key - data = { - 'aws_secret' => 's', - 'sns_topic' => 't' - } - svc = service :push, data, payload - - assert_raise Service::ConfigurationError do - svc.receive_event - end + verify_requires(service :push, data.except!('aws_key'), payload) end def test_requires_aws_secret - data = { - 'aws_key' => 'k', - 'sns_topic' => 't' - } - svc = service :push, data, payload - - assert_raise Service::ConfigurationError do - svc.receive_event - end + verify_requires(service :push, data.except!('aws_secret'), payload) end def test_requires_sns_topic - data = { - 'aws_key' => 'k', - 'aws_secret' => 's' - } - svc = service :push, data, payload - - assert_raise Service::ConfigurationError do - svc.receive_event - end - end - - def test_stubs - topicName = "stub_topic" - queueName = "stub_queue" - message = "this is a test message" - sns = FakeSNS.new - topic = sns.topics.create(topicName) - queue = FakeQueue.new(queueName) - topic.subscribe(queue) - topic.publish(message) - assert_equal 1, topic.messages.size - assert_equal queueName, topic.subscribers[0].name - end - - def aws_sns_stub - FakeSNS.new - end - - def aws_sqs_stub - FakeSQS.new - end - - class FakeSQS - attr_reader :queues - def initialize - @queues ||= FakeQueueCollection.new - end - end - - class FakeQueueCollection - def create(queueName) - FakeQueue.new(queueName) - end + verify_requires(service :push, data.except!('sns_topic'), payload) end - class FakeQueue - attr_reader :name - def initialize(name) - @name = name - end - end - - class FakeSNS - attr_reader :topics - def initialize - @topics ||= FakeTopicCollection.new - end - end - - class FakeTopicCollection - attr_reader :topic, :topic_by_arn - def create(name) - @topic ||= FakeTopic.new("fakearn:" + name) - end - # Refer by topic ARN (see AWS::SNS::TopicCollection): - def [](topic_arn) - @topic_by_arn ||= FakeTopic.new(topic_arn) - end + def test_requires_sns_topic + verify_requires(service :push, data.except!('sns_topic'), payload) end - class FakeTopic - attr_reader :arn - attr_reader :messages - attr_reader :subscribers + def test_defaults_sns_region + svc = service :push, data.except!('sns_region'), payload + svc.validate_data - def initialize arn - @arn = arn - @messages = [] - @subscribers = [] - end - def subscribe(queue) - @subscribers << queue - end - def publish(message) - @messages << message - end + assert_equal svc.data['sns_region'], data['sns_region'] end def service(*args) diff --git a/test/apiary_test.rb b/test/apiary_test.rb index 44b0e6bec..68bce9377 100644 --- a/test/apiary_test.rb +++ b/test/apiary_test.rb @@ -19,7 +19,7 @@ def test_push assert_equal @svc.domain, body['vanity'] [200, {}, ''] end - @svc.receive_push + @svc.receive_event end def service(*args) diff --git a/test/aws_ops_works_test.rb b/test/aws_ops_works_test.rb new file mode 100644 index 000000000..fef03b0a3 --- /dev/null +++ b/test/aws_ops_works_test.rb @@ -0,0 +1,92 @@ +require File.expand_path('../helper', __FILE__) + +class AwsOpsWorksTest < Service::TestCase + + def setup + AWS.stub! + end + + def test_stack_id_sent + response = service.receive_event + assert_equal sample_data['stack_id'], response.request_options[:stack_id] + end + + def test_stack_id_missing + svc = service(sample_data.except('stack_id')) + assert_raise Service::ConfigurationError do + svc.receive_event + end + end + + def test_app_id_sent + response = service.receive_event + assert_equal sample_data['app_id'], response.request_options[:app_id] + end + + def test_app_id_missing + svc = service(sample_data.except('app_id')) + assert_raise Service::ConfigurationError do + svc.receive_event + end + end + + def test_expected_branch_name_received + response = service.receive_event + assert_not_nil response + end + + def test_unexpected_branch_name_received + response = service(sample_data, sample_payload('another-branch')).receive_event + assert_nil response + end + + def test_branch_name_missing + svc = service(sample_data.except('branch_name')) + assert_raise Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_access_key_id_configured + config = service.ops_works_client.config + assert_equal sample_data['aws_access_key_id'], config.access_key_id + end + + def test_aws_access_key_id_missing + svc = service(sample_data.except('aws_access_key_id')) + assert_raise Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_secret_access_key_configured + config = service.ops_works_client.config + assert_equal sample_data['aws_secret_access_key'], config.secret_access_key + end + + def test_aws_secret_access_key_missing + svc = service(sample_data.except('aws_secret_access_key')) + assert_raise Service::ConfigurationError do + svc.receive_event + end + end + + def service(data = sample_data, payload = sample_payload) + Service::AwsOpsWorks.new(:push, data, payload) + end + + def sample_data + { + 'aws_access_key_id' => 'AKIA1234567890123456', + 'aws_secret_access_key' => '0123456789+0123456789+0123456789+0123456', + 'stack_id' => '12345678-1234-1234-1234-123456789012', + 'app_id' => '01234567-0123-0123-0123-012345678901', + 'branch_name' => 'default-branch' + } + end + + def sample_payload(branch_name = 'default-branch') + Service::PushHelpers.sample_payload.merge('ref' => "refs/heads/#{branch_name}") + end + +end diff --git a/test/flowdock_test.rb b/test/flowdock_test.rb index 204085d5d..a393a6f5f 100644 --- a/test/flowdock_test.rb +++ b/test/flowdock_test.rb @@ -7,12 +7,10 @@ def setup end def test_push - @tokens.to_s.split(",").each do |t| - @stubs.post "/v1/github/#{t}" do |env| - assert_match /json/, env[:request_headers]['content-type'] - assert_equal push_payload, JSON.parse(env[:body]) - [200, {}, ''] - end + @stubs.post "/v1/github/#{@tokens}" do |env| + assert_match /json/, env[:request_headers]['content-type'] + assert_equal push_payload, JSON.parse(env[:body]) + [200, {}, ''] end svc = service( @@ -21,11 +19,9 @@ def test_push end def test_token_sanitization - @tokens.to_s.split(",").each do |t| - @stubs.post "/v1/github/#{t}" do |env| - assert_equal payload, JSON.parse(env[:body]) - [200, {}, ''] - end + @stubs.post "/v1/github/#{@tokens}" do |env| + assert_equal payload, JSON.parse(env[:body]) + [200, {}, ''] end svc = service( diff --git a/test/gitter_test.rb b/test/gitter_test.rb new file mode 100644 index 000000000..63dedf224 --- /dev/null +++ b/test/gitter_test.rb @@ -0,0 +1,62 @@ +require File.expand_path('../helper', __FILE__) + +class GitterTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + data = {'token' => "0123456789abcde"} + + svc = service :push, data, push_payload + + @stubs.post "/e/#{data['token']}" do |env| + body = JSON.parse(env[:body]) + + #assert_equal env[:url].host, "webhooks.gitter.im" + assert_equal env[:request_headers]['X-GitHub-Event'], "push" + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_mute_fork + data = {'token' => "0123456789abcde", 'mute_fork' => true} + + svc = service :fork, data, basic_payload + svc.receive_event + assert @stubs.empty? + end + + def test_mute_watch + data = {'token' => "0123456789abcde", 'mute_watch' => true} + + svc = service :watch, data, basic_payload + svc.receive_event + assert @stubs.empty? + end + + def test_mute_comments + data = {'token' => "0123456789abcde", 'mute_comments' => true} + + svc = service :issue_comment, data, issue_comment_payload + svc.receive_event + assert @stubs.empty? + end + + def test_mute_wiki + data = {'token' => "0123456789abcde", 'mute_wiki' => true} + + svc = service :gollum, data, gollum_payload + svc.receive_event + assert @stubs.empty? + end + + def service_class + Service::Gitter + end +end + diff --git a/test/irc_test.rb b/test/irc_test.rb index b071d956e..e6df67889 100644 --- a/test/irc_test.rb +++ b/test/irc_test.rb @@ -279,7 +279,12 @@ def test_default_port_no_ssl svc = service({'ssl' => '0'}, payload) assert_equal 6667, svc.port end - + + def test_default_port_with_empty_string + svc = service({'port' => ''}, payload) + assert_equal 6667, svc.port + end + def test_overridden_port svc = service({'port' => '1234'}, payload) assert_equal 1234, svc.port diff --git a/test/notifo_test.rb b/test/notifo_test.rb deleted file mode 100644 index 7fcb5b7b9..000000000 --- a/test/notifo_test.rb +++ /dev/null @@ -1,43 +0,0 @@ -require File.expand_path('../helper', __FILE__) - -class NotifoTest < Service::TestCase - def setup - @stubs = Faraday::Adapter::Test::Stubs.new - end - - def test_push - subscribed = %w(a b) - notified = %w(a b) - @stubs.post "/v1/subscribe_user" do |env| - assert_equal 'api.notifo.com', env[:url].host - data = Faraday::Utils.parse_nested_query(env[:body]) - assert_equal subscribed.shift, data['username'] - [200, {}, ''] - end - - @stubs.post "/v1/send_notification" do |env| - assert_equal 'api.notifo.com', env[:url].host - data = Faraday::Utils.parse_nested_query(env[:body]) - assert_equal notified.shift, data['to'] - [200, {}, ''] - end - - svc = service({'subscribers' => 'a,b'}, payload) - svc.secrets = {'notifo' => {'apikey' => 'a'}} - svc.receive_push - end - - def test_push_with_empty_commits - data = payload - data['commits'] = [] - - svc = service({'subscribers' => 'a,b'}, data) - svc.secrets = {'notifo' => {'apikey' => 'a'}} - svc.receive_push - end - - def service(*args) - super Service::Notifo, *args - end -end - diff --git a/test/skydeskprojects_test.rb b/test/skydeskprojects_test.rb index 1af3b4109..e1c171b52 100644 --- a/test/skydeskprojects_test.rb +++ b/test/skydeskprojects_test.rb @@ -13,7 +13,7 @@ def test_push } svc = service(data, payload) @stubs.post url do |env| - #assert_equal 'projects.skydesk.jp', env[:url].host + assert_equal 'projects.skydesk.jp', env[:url].host params = Faraday::Utils.parse_query(env[:body]) assert_equal '1234', params['pId'] assert_equal 'a13d', params['authtoken'] diff --git a/test/sqs_queue_test.rb b/test/sqs_queue_test.rb index 19615cec8..db2742c1e 100644 --- a/test/sqs_queue_test.rb +++ b/test/sqs_queue_test.rb @@ -8,22 +8,27 @@ class SqsQueueTest < Service::TestCase def setup @stubs = Faraday::Adapter::Test::Stubs.new - @data = { + @old_data = { 'aws_access_key' => ' AIQPJBLDKSU8SKLZNHGLQA', 'aws_secret_key' => 'jaz8OQ72kzmblq9TYY28alqp9y7Zmvlsq9iJJqAA ', 'sqs_queue_name' => ' testQueue ' } + @data = { + 'aws_sqs_arn' => "arn:aws:sqs:us-west-2:1234567890:testqueue", + 'aws_access_key' => ' AIQPJBLDKSU8SKLZNHGLQA', + 'aws_secret_key' => 'jaz8OQ72kzmblq9TYY28alqp9y7Zmvlsq9iJJqAA ' + } end def test_strip_whitespace_from_form_data - svc = service(@data, payload) + svc = service(@old_data, payload) assert_equal 'AIQPJBLDKSU8SKLZNHGLQA', svc.access_key assert_equal 'jaz8OQ72kzmblq9TYY28alqp9y7Zmvlsq9iJJqAA', svc.secret_key assert_equal 'testQueue', svc.queue_name end def test_aws_key_lengths - svc = service(@data, payload) + svc = service(@old_data, payload) assert_equal 22, svc.access_key.length assert_equal 40, svc.secret_key.length end @@ -32,4 +37,19 @@ def service(*args) super Service::SqsQueue, *args end + def test_sets_queue_name_with_arn + svc = service(@data, payload) + assert_equal 'testqueue', svc.queue_name + end + + def test_sets_region_with_old_data + svc = service(@old_data, payload) + assert_equal 'us-east-1', svc.region + end + + def test_sets_region_with_new_data + svc = service(@data, payload) + assert_equal 'us-west-2', svc.region + end + end diff --git a/test/versioneye_test.rb b/test/versioneye_test.rb new file mode 100644 index 000000000..77cead071 --- /dev/null +++ b/test/versioneye_test.rb @@ -0,0 +1,31 @@ +# encoding: utf-8 + +require File.expand_path('../helper', __FILE__) + +class VersioneyeTest < Service::TestCase + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push_event + payload = {'app_name' => "VersionEye"} + project_id = "987654321" + api_key = "123456789" + url = "api/v2/github/hook/#{project_id}" + + svc = service(:push, {'api_key' => api_key, 'project_id' => project_id }, payload) + @stubs.post url do |env| + assert_equal "https://www.versioneye.com/api/v2/github/hook/#{project_id}?api_key=#{api_key}", env[:url].to_s + assert_match 'application/json', env[:request_headers]['content-type'] + end + svc.receive_event + end + + private + + def service(*args) + super Service::Versioneye, *args + end + +end diff --git a/vendor/cache/aws-sdk-1.28.1.gem b/vendor/cache/aws-sdk-1.28.1.gem new file mode 100644 index 000000000..5903466f1 Binary files /dev/null and b/vendor/cache/aws-sdk-1.28.1.gem differ diff --git a/vendor/cache/aws-sdk-1.8.5.gem b/vendor/cache/aws-sdk-1.8.5.gem deleted file mode 100644 index 8028eae84..000000000 Binary files a/vendor/cache/aws-sdk-1.8.5.gem and /dev/null differ diff --git a/vendor/cache/faraday_middleware-0.8.7.gem b/vendor/cache/faraday_middleware-0.8.7.gem deleted file mode 100644 index 7115e5899..000000000 Binary files a/vendor/cache/faraday_middleware-0.8.7.gem and /dev/null differ diff --git a/vendor/cache/faraday_middleware-0.9.0.gem b/vendor/cache/faraday_middleware-0.9.0.gem new file mode 100644 index 000000000..e911cb35e Binary files /dev/null and b/vendor/cache/faraday_middleware-0.9.0.gem differ diff --git a/vendor/cache/json-1.8.0.gem b/vendor/cache/json-1.8.0.gem deleted file mode 100644 index d384145ff..000000000 Binary files a/vendor/cache/json-1.8.0.gem and /dev/null differ diff --git a/vendor/cache/json-1.8.1.gem b/vendor/cache/json-1.8.1.gem new file mode 100644 index 000000000..d903086bb Binary files /dev/null and b/vendor/cache/json-1.8.1.gem differ diff --git a/vendor/cache/jwt-0.1.6.gem b/vendor/cache/jwt-0.1.6.gem deleted file mode 100644 index 2c6a5910c..000000000 Binary files a/vendor/cache/jwt-0.1.6.gem and /dev/null differ diff --git a/vendor/cache/jwt-0.1.8.gem b/vendor/cache/jwt-0.1.8.gem new file mode 100644 index 000000000..bbf7d0cec Binary files /dev/null and b/vendor/cache/jwt-0.1.8.gem differ diff --git a/vendor/cache/mail-2.3.0.gem b/vendor/cache/mail-2.3.0.gem deleted file mode 100644 index f1dcdbe21..000000000 Binary files a/vendor/cache/mail-2.3.0.gem and /dev/null differ diff --git a/vendor/cache/mail-2.5.4.gem b/vendor/cache/mail-2.5.4.gem new file mode 100644 index 000000000..bc7eea2d6 Binary files /dev/null and b/vendor/cache/mail-2.5.4.gem differ diff --git a/vendor/cache/mime-types-1.18.gem b/vendor/cache/mime-types-1.18.gem deleted file mode 100644 index 80a2dd89b..000000000 Binary files a/vendor/cache/mime-types-1.18.gem and /dev/null differ diff --git a/vendor/cache/mime-types-1.25.1.gem b/vendor/cache/mime-types-1.25.1.gem new file mode 100644 index 000000000..877d8a97f Binary files /dev/null and b/vendor/cache/mime-types-1.25.1.gem differ diff --git a/vendor/cache/mini_portile-0.5.1.gem b/vendor/cache/mini_portile-0.5.1.gem deleted file mode 100644 index 31fbfc76d..000000000 Binary files a/vendor/cache/mini_portile-0.5.1.gem and /dev/null differ diff --git a/vendor/cache/mini_portile-0.5.2.gem b/vendor/cache/mini_portile-0.5.2.gem new file mode 100644 index 000000000..d65f88009 Binary files /dev/null and b/vendor/cache/mini_portile-0.5.2.gem differ diff --git a/vendor/cache/multi_json-1.3.2.gem b/vendor/cache/multi_json-1.3.2.gem deleted file mode 100644 index aca02098e..000000000 Binary files a/vendor/cache/multi_json-1.3.2.gem and /dev/null differ diff --git a/vendor/cache/multi_json-1.8.2.gem b/vendor/cache/multi_json-1.8.2.gem new file mode 100644 index 000000000..8d64dccf4 Binary files /dev/null and b/vendor/cache/multi_json-1.8.2.gem differ diff --git a/vendor/cache/multipart-post-1.1.5.gem b/vendor/cache/multipart-post-1.1.5.gem deleted file mode 100644 index b8c6daa3e..000000000 Binary files a/vendor/cache/multipart-post-1.1.5.gem and /dev/null differ diff --git a/vendor/cache/multipart-post-1.2.0.gem b/vendor/cache/multipart-post-1.2.0.gem new file mode 100644 index 000000000..fca7ae786 Binary files /dev/null and b/vendor/cache/multipart-post-1.2.0.gem differ diff --git a/vendor/cache/right_aws-3.0.3.gem b/vendor/cache/right_aws-3.0.3.gem deleted file mode 100644 index c1f44bc44..000000000 Binary files a/vendor/cache/right_aws-3.0.3.gem and /dev/null differ diff --git a/vendor/cache/right_http_connection-1.3.0.gem b/vendor/cache/right_http_connection-1.3.0.gem deleted file mode 100644 index bf9fdfb2f..000000000 Binary files a/vendor/cache/right_http_connection-1.3.0.gem and /dev/null differ diff --git a/vendor/cache/simple_oauth-0.1.5.gem b/vendor/cache/simple_oauth-0.1.5.gem deleted file mode 100644 index 7f5fe18d1..000000000 Binary files a/vendor/cache/simple_oauth-0.1.5.gem and /dev/null differ diff --git a/vendor/cache/simple_oauth-0.1.9.gem b/vendor/cache/simple_oauth-0.1.9.gem new file mode 100644 index 000000000..350d10055 Binary files /dev/null and b/vendor/cache/simple_oauth-0.1.9.gem differ diff --git a/vendor/cache/treetop-1.4.10.gem b/vendor/cache/treetop-1.4.10.gem deleted file mode 100644 index 3c98f3d50..000000000 Binary files a/vendor/cache/treetop-1.4.10.gem and /dev/null differ diff --git a/vendor/cache/treetop-1.4.15.gem b/vendor/cache/treetop-1.4.15.gem new file mode 100644 index 000000000..0a621ef39 Binary files /dev/null and b/vendor/cache/treetop-1.4.15.gem differ diff --git a/vendor/cache/twitter-stream-0.1.15.gem b/vendor/cache/twitter-stream-0.1.15.gem deleted file mode 100644 index 6fb0c74e2..000000000 Binary files a/vendor/cache/twitter-stream-0.1.15.gem and /dev/null differ diff --git a/vendor/cache/twitter-stream-0.1.16.gem b/vendor/cache/twitter-stream-0.1.16.gem new file mode 100644 index 000000000..aa7e340ee Binary files /dev/null and b/vendor/cache/twitter-stream-0.1.16.gem differ diff --git a/vendor/cache/xmpp4r-0.5.5.gem b/vendor/cache/xmpp4r-0.5.5.gem new file mode 100644 index 000000000..ce5bf9778 Binary files /dev/null and b/vendor/cache/xmpp4r-0.5.5.gem differ diff --git a/vendor/cache/xmpp4r-0.5.gem b/vendor/cache/xmpp4r-0.5.gem deleted file mode 100644 index a9c3d0f46..000000000 Binary files a/vendor/cache/xmpp4r-0.5.gem and /dev/null differ