cocoapods-update-if-you-dare 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 785d8261ab1273932c85b9fe5dcdcc1ab99ebcb5
4
+ data.tar.gz: 74297cebc78fb58fa7647d8f380e7368701bba29
5
+ SHA512:
6
+ metadata.gz: 58b7e3a326ffff49b2f1039d04bbefee4e3ee6167f3e4d3c0a302593abc8711fbb7175f59a3c67b15b272dc734a31621afd1c0ed84879c2786fbb42388a9ca9d
7
+ data.tar.gz: 6826c4a9893c82c8ad66047a0c63f999235ddc4ac04d2c2c1b4ec62a6028a13a2248157490c77b5437ccdb4f65133778ae1fe850fce300e160dfe4ae62042bf5
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.3
4
+ before_install: gem install bundler -v 1.11.2
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'cocoapods'
7
+
8
+ gem 'mocha'
9
+ gem 'bacon'
10
+ gem 'mocha-on-bacon'
11
+ gem 'prettybacon'
12
+ end
@@ -0,0 +1,30 @@
1
+ # Update If You Dare
2
+ A [CocoaPods](https://cocoapods.org) plugin.
3
+
4
+ ## Usage
5
+
6
+ Run `pod update` and the plugin will try and persuade you to use alternatives before it dares you to just update everything anyway.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'cocoapods-update-if-you-dare'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install cocoapods-update-if-you-dare
23
+
24
+ ## Contributing
25
+
26
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Ashton-W/cocoapods-update-if-you-dare.
27
+
28
+ ## Credits
29
+
30
+ Thanks [@orta](https://github.com/orta/) for chatting to me about this on Slack and for inspiring me with [cocoapods-always-be-bundleing](https://github.com/orta/cocoapods-always-be-bundleing).
@@ -0,0 +1,12 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ def specs(dir)
4
+ FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
5
+ end
6
+
7
+ desc 'Runs all the specs'
8
+ task :specs do
9
+ sh "bundle exec bacon #{specs('**')}"
10
+ end
11
+
12
+ task :default => :specs
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods-update-if-you-dare/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "cocoapods-update-if-you-dare"
8
+ spec.version = CocoapodsUpdateIfYouDare::VERSION
9
+ spec.authors = ["Ashton Williams"]
10
+ spec.email = ["Ashton-W@users.noreply.github.com"]
11
+ spec.summary = %q{update ... if you dare}
12
+ spec.description = %q{Go ahead, just update. I dare you.}
13
+ spec.homepage = "https://github.com/Ashton-W/cocoapods-update-if-you-dare"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.11"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec", "~> 3.0"
24
+ end
@@ -0,0 +1 @@
1
+ require "cocoapods-update-if-you-dare/version"
@@ -0,0 +1,3 @@
1
+ module CocoapodsUpdateIfYouDare
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,50 @@
1
+ require 'colored'
2
+
3
+ module Pod
4
+ class Command
5
+ class Update < Command
6
+
7
+ alias_method :run_before_update_if_you_dare, :run
8
+
9
+ def run
10
+ verify_podfile_exists! if self.respond_to? :verify_podfile_exists!
11
+
12
+ dont_talk_to_me_or_my_son_ever_again = `defaults read net.Ashton-W.cocoapods-update-if-you-dare DontAskAgain 2>/dev/null`.chomp == "1"
13
+
14
+ unless @pods or dont_talk_to_me_or_my_son_ever_again
15
+
16
+ puts "\n"
17
+ puts "[!] Running `pod update` will update ALL pods.".yellow
18
+ puts "\n"
19
+ puts "If you proceed you will be responsible for any changes in your dependencies and"
20
+ puts "any changes in the project required to be compatible."
21
+ puts "\n"
22
+ puts " pod update".green + " [POD_NAMES ...]".magenta + " should be used to update specific pods."
23
+ puts " pod install".green + " should be used to install changes to the Podfile."
24
+ puts "\n"
25
+ puts "For more information use the " + "--help".blue + " parameter with any command"
26
+ puts "or consult " + "https://guides.cocoapods.org".cyan
27
+ puts "\n"
28
+ puts "This message brought to you by the plugin cocoapods-update-if-you-dare"
29
+ puts "\n"
30
+
31
+ question = "Are you sure you want to update ALL pods?"
32
+ answer = UI.choose_from_array(["Yes", "No", "Yes! Don't ask me again"], question)
33
+
34
+ if answer == 0
35
+ puts "You have choosen your fate.".yellow
36
+ elsif answer == 1
37
+ raise Informative, "You didn't dare."
38
+ elsif answer == 2
39
+ puts "OK! You know what you are doing.".green
40
+ `defaults write net.Ashton-W.cocoapods-update-if-you-dare DontAskAgain -bool true`
41
+ end
42
+
43
+ end
44
+
45
+ run_before_update_if_you_dare
46
+ end
47
+
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,2 @@
1
+
2
+ # how do I test?
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'cocoapods-update-if-you-dare'
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-update-if-you-dare
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ashton Williams
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Go ahead, just update. I dare you.
56
+ email:
57
+ - Ashton-W@users.noreply.github.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - Gemfile
66
+ - README.md
67
+ - Rakefile
68
+ - cocoapods-update-if-you-dare.gemspec
69
+ - lib/cocoapods-update-if-you-dare.rb
70
+ - lib/cocoapods-update-if-you-dare/version.rb
71
+ - lib/cocoapods_plugin.rb
72
+ - spec/cocoapods-update-if-you-dare/dare_spec.rb
73
+ - spec/spec_helper.rb
74
+ homepage: https://github.com/Ashton-W/cocoapods-update-if-you-dare
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.2.2
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: update ... if you dare
98
+ test_files:
99
+ - spec/cocoapods-update-if-you-dare/dare_spec.rb
100
+ - spec/spec_helper.rb