reclone 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2fd280d184451779af1a7392aaa43fd9b240d1a8285eb59b00a4cd9f0a7933dd
4
+ data.tar.gz: 0c3199f83066f4a01549a3c4b3797be4123ed7434c5003444e2efdf77f3c8cb6
5
+ SHA512:
6
+ metadata.gz: 82ae37c552b24c8e20d7b429e7c2d50214ef2bada8e71a59a37f0c9b36d83a1770e17cda3a4adb51ba199d8617d71c7b58a1fce2b31784f78959813dc7aa6ad3
7
+ data.tar.gz: aa242d3620e24e7570a1703030c04e9aec3abafb0af714371547b3653283946a6c1e8936ea041bf0814384a5b7912e84f2d73e2cb905e066a07fb6ff6e4075b8
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.6.1
6
+ before_install: gem install bundler -v 2.1.4
File without changes
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at dwayne.harmon@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in reclone.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.0"
@@ -0,0 +1,125 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ reclone (0.1.0)
5
+ clamp
6
+ dotenv
7
+ git
8
+ net-ping
9
+ octokit (~> 4.0)
10
+ pry
11
+ tty
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ addressable (2.7.0)
17
+ public_suffix (>= 2.0.2, < 5.0)
18
+ clamp (1.3.1)
19
+ coderay (1.1.3)
20
+ diff-lcs (1.3)
21
+ dotenv (2.7.6)
22
+ equatable (0.5.0)
23
+ faraday (1.0.1)
24
+ multipart-post (>= 1.2, < 3)
25
+ git (1.7.0)
26
+ rchardet (~> 1.8)
27
+ method_source (1.0.0)
28
+ multipart-post (2.1.1)
29
+ necromancer (0.4.0)
30
+ net-ping (2.0.8)
31
+ octokit (4.18.0)
32
+ faraday (>= 0.9)
33
+ sawyer (~> 0.8.0, >= 0.5.3)
34
+ pastel (0.7.2)
35
+ equatable (~> 0.5.0)
36
+ tty-color (~> 0.4.0)
37
+ pry (0.13.1)
38
+ coderay (~> 1.1)
39
+ method_source (~> 1.0)
40
+ public_suffix (4.0.5)
41
+ rake (12.3.3)
42
+ rchardet (1.8.0)
43
+ rspec (3.9.0)
44
+ rspec-core (~> 3.9.0)
45
+ rspec-expectations (~> 3.9.0)
46
+ rspec-mocks (~> 3.9.0)
47
+ rspec-core (3.9.2)
48
+ rspec-support (~> 3.9.3)
49
+ rspec-expectations (3.9.2)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.9.0)
52
+ rspec-mocks (3.9.1)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.9.0)
55
+ rspec-support (3.9.3)
56
+ sawyer (0.8.2)
57
+ addressable (>= 2.3.5)
58
+ faraday (> 0.8, < 2.0)
59
+ tty (0.7.0)
60
+ equatable (~> 0.5.0)
61
+ pastel (~> 0.7.0)
62
+ tty-color (~> 0.4.0)
63
+ tty-command (~> 0.4.0)
64
+ tty-cursor (~> 0.4.0)
65
+ tty-editor (~> 0.2.0)
66
+ tty-file (~> 0.3.0)
67
+ tty-pager (~> 0.7.0)
68
+ tty-platform (~> 0.1.0)
69
+ tty-progressbar (~> 0.10.0)
70
+ tty-prompt (~> 0.12.0)
71
+ tty-screen (~> 0.5.0)
72
+ tty-spinner (~> 0.4.0)
73
+ tty-table (~> 0.8.0)
74
+ tty-which (~> 0.3.0)
75
+ tty-color (0.4.3)
76
+ tty-command (0.4.0)
77
+ pastel (~> 0.7.0)
78
+ tty-cursor (0.4.0)
79
+ tty-editor (0.2.0)
80
+ tty-prompt (~> 0.12.0)
81
+ tty-which (~> 0.3.0)
82
+ tty-file (0.3.0)
83
+ diff-lcs (~> 1.3.0)
84
+ pastel (~> 0.7.0)
85
+ tty-prompt (~> 0.12.0)
86
+ tty-pager (0.7.1)
87
+ tty-screen (~> 0.5.0)
88
+ tty-which (~> 0.3.0)
89
+ verse (~> 0.5.0)
90
+ tty-platform (0.1.0)
91
+ tty-progressbar (0.10.1)
92
+ tty-screen (~> 0.5.0)
93
+ tty-prompt (0.12.0)
94
+ necromancer (~> 0.4.0)
95
+ pastel (~> 0.7.0)
96
+ tty-cursor (~> 0.4.0)
97
+ wisper (~> 1.6.1)
98
+ tty-screen (0.5.1)
99
+ tty-spinner (0.4.1)
100
+ tty-table (0.8.0)
101
+ equatable (~> 0.5.0)
102
+ necromancer (~> 0.4.0)
103
+ pastel (~> 0.7.0)
104
+ tty-screen (~> 0.5.0)
105
+ unicode-display_width (~> 1.1.0)
106
+ verse (~> 0.5.0)
107
+ tty-which (0.3.0)
108
+ unicode-display_width (1.1.3)
109
+ unicode_utils (1.4.0)
110
+ verse (0.5.0)
111
+ unicode-display_width (~> 1.1.0)
112
+ unicode_utils (~> 1.4.0)
113
+ wisper (1.6.1)
114
+
115
+ PLATFORMS
116
+ ruby
117
+
118
+ DEPENDENCIES
119
+ bundler (~> 2.1.4)
120
+ rake (~> 12.0)
121
+ reclone!
122
+ rspec (~> 3.0)
123
+
124
+ BUNDLED WITH
125
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 dwieb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,44 @@
1
+ # Reclone
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/reclone`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'reclone'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install reclone
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
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
+
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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/<github username>/reclone. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/<github username>/reclone/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
+
42
+ ## Code of Conduct
43
+
44
+ Everyone interacting in the Reclone project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<github username>/reclone/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "reclone"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ require "bundler/setup"
3
+ require "reclone"
4
+
5
+ Reclone::CLI.new.call
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,19 @@
1
+ require "reclone/version"
2
+
3
+
4
+ #! Added by moi
5
+ require_relative "./reclone/version.rb"
6
+ require_relative "./reclone/cli.rb"
7
+ require_relative "reclone/user.rb"
8
+ require_relative "reclone/octokitty.rb"
9
+
10
+ require 'pry'
11
+ require 'octokit'
12
+ require 'net/ping'
13
+ require 'dotenv'
14
+ Dotenv.load('./.env')
15
+
16
+ module Reclone
17
+ class Error < StandardError; end
18
+ # Your code goes here...
19
+ end
@@ -0,0 +1,70 @@
1
+ class Reclone::CLI
2
+ attr_accessor :current_user
3
+ @@counter = 0
4
+
5
+ def initialize
6
+ @@counter += 1
7
+ end
8
+ #? Reclone::CLI.new.call
9
+ def call
10
+ up?
11
+ # get_config
12
+ puts "Hello human."; sleep 0.5
13
+ log_in
14
+ puts "oh haayyy"
15
+ recloner
16
+ end
17
+
18
+ # Internet connection check
19
+ def up?
20
+ if Net::Ping::External.new("www.google.com").ping? != true
21
+ puts "You need an internet connection to run this program..."
22
+ puts "As if I needed to tell you that."; sleep 1
23
+ puts "Good bye for now, human."
24
+ exit
25
+ end
26
+ end
27
+
28
+ def directory_exists?(directory)
29
+ Dir.exists?(directory)
30
+ end
31
+
32
+ def log_in
33
+ puts "Please enter your Github user name."
34
+ user_name = gets.strip.to_s
35
+ @current_user = User.new(user_name)
36
+ # binding.pry
37
+ if user_name == "exit"
38
+ exit!
39
+ elsif @current_user.user_info
40
+ puts "User account found."
41
+ else
42
+ puts "I'm having a hard time locating that username."
43
+ puts "Please try again."
44
+ log_in
45
+ end
46
+ end
47
+
48
+ def recloner
49
+ # puts "Where would you like to reclone your repositories?"
50
+ # puts 'eg: ~/Development/code/rc'
51
+
52
+ # user_input = gets.strip
53
+
54
+ puts "Shall I do the thing?"
55
+ user_input = gets.strip
56
+
57
+ if user_input == "yes"|| user_input == "y" || user_input == 'yis' ||user_input == "yeth"
58
+
59
+ current_user.repos.each do |repo|
60
+ if !directory_exists?(repo[:full_name])
61
+ `git clone #{repo[:ssh_url]}`
62
+ end
63
+ end
64
+ else
65
+ puts "Then why are you even here?"
66
+ exit
67
+ end
68
+ end
69
+
70
+ end
@@ -0,0 +1,30 @@
1
+ class Octokitty
2
+ #! Do I need this class?
3
+ #! If so, can I how will the user class leverage octokitty
4
+
5
+ attr_reader :client, :repo_call
6
+
7
+ def initialize
8
+ @client = Octokit::Client.new(access_token: ENV["GIT_PAT"], auto_traversal: true, per_page: 100)
9
+ end
10
+
11
+ def user_config(user_name)
12
+ # binding.pry
13
+ begin
14
+ user = @client.user(user_name)
15
+ rescue
16
+ user = nil
17
+ end
18
+ user
19
+ end
20
+
21
+ def repo_config(user)
22
+ @client.repos(user, {sort: "created", direction: "desc"})
23
+ end
24
+ end
25
+
26
+ #! Handling 404's from octokit: http://rubylearning.com/satishtalim/ruby_exceptions.html
27
+ #! https://github.com/octokit/octokit.rb#pagination
28
+ #! https://developer.github.com/v3/repos/
29
+ #! https://www.rubydoc.info/github/octokit/octokit.rb/Octokit/Client/Search#search_code-instance_method
30
+ #! http://docs2.lfe.io/guides/traversing-with-pagination/
@@ -0,0 +1,208 @@
1
+ class User
2
+ attr_accessor :username, :user_info, :client, :repos
3
+
4
+ def initialize(name=nil)
5
+ # @client = Octokitty.new
6
+ @user_info = Octokitty.new.user_config(name)
7
+ @repos = Octokitty.new.repo_config(@user_info.login) if @user_info
8
+ end
9
+
10
+ end
11
+
12
+ # > [:!,
13
+ # :!=,
14
+ # :!~,
15
+ # :&,
16
+ # :*,
17
+ # :+,
18
+ # :-,
19
+ # :<<,
20
+ # :<=>,
21
+ # :==,
22
+ # :===,
23
+ # :=~,
24
+ # :[],
25
+ # :[]=,
26
+ # :__binding__,
27
+ # :__id__,
28
+ # :__send__,
29
+ # :all?,
30
+ # :any?,
31
+ # :append,
32
+ # :assoc,
33
+ # :at,
34
+ # :bsearch,
35
+ # :bsearch_index,
36
+ # :chain,
37
+ # :chunk,
38
+ # :chunk_while,
39
+ # :class,
40
+ # :clear,
41
+ # :clone,
42
+ # :collect,
43
+ # :collect!,
44
+ # :collect_concat,
45
+ # :combination,
46
+ # :compact,
47
+ # :compact!,
48
+ # :concat,
49
+ # :count,
50
+ # :cycle,
51
+ # :define_singleton_method,
52
+ # :delete,
53
+ # :delete_at,
54
+ # :delete_if,
55
+ # :detect,
56
+ # :difference,
57
+ # :dig,
58
+ # :display,
59
+ # :drop,
60
+ # :drop_while,
61
+ # :dup,
62
+ # :each,
63
+ # :each_cons,
64
+ # :each_entry,
65
+ # :each_index,
66
+ # :each_slice,
67
+ # :each_with_index,
68
+ # :each_with_object,
69
+ # :empty?,
70
+ # :entries,
71
+ # :enum_for,
72
+ # :eql?,
73
+ # :equal?,
74
+ # :extend,
75
+ # :fetch,
76
+ # :fill,
77
+ # :filter,
78
+ # :filter!,
79
+ # :find,
80
+ # :find_all,
81
+ # :find_index,
82
+ # :first,
83
+ # :flat_map,
84
+ # :flatten,
85
+ # :flatten!,
86
+ # :freeze,
87
+ # :frozen?,
88
+ # :gem,
89
+ # :grep,
90
+ # :grep_v,
91
+ # :group_by,
92
+ # :hash,
93
+ # :include?,
94
+ # :index,
95
+ # :inject,
96
+ # :insert,
97
+ # :inspect,
98
+ # :instance_eval,
99
+ # :instance_exec,
100
+ # :instance_of?,
101
+ # :instance_variable_defined?,
102
+ # :instance_variable_get,
103
+ # :instance_variable_set,
104
+ # :instance_variables,
105
+ # :is_a?,
106
+ # :itself,
107
+ # :join,
108
+ # :keep_if,
109
+ # :kind_of?,
110
+ # :last,
111
+ # :lazy,
112
+ # :length,
113
+ # :map,
114
+ # :map!,
115
+ # :max,
116
+ # :max_by,
117
+ # :member?,
118
+ # :method,
119
+ # :methods,
120
+ # :min,
121
+ # :min_by,
122
+ # :minmax,
123
+ # :minmax_by,
124
+ # :nil?,
125
+ # :none?,
126
+ # :object_id,
127
+ # :one?,
128
+ # :pack,
129
+ # :partition,
130
+ # :permutation,
131
+ # :pop,
132
+ # :prepend,
133
+ # :pretty_inspect,
134
+ # :pretty_print,
135
+ # :pretty_print_cycle,
136
+ # :pretty_print_inspect,
137
+ # :pretty_print_instance_variables,
138
+ # :private_methods,
139
+ # :product,
140
+ # :protected_methods,
141
+ # :pry,
142
+ # :public_method,
143
+ # :public_methods,
144
+ # :public_send,
145
+ # :push,
146
+ # :rassoc,
147
+ # :reduce,
148
+ # :reject,
149
+ # :reject!,
150
+ # :remove_instance_variable,
151
+ # :repeated_combination,
152
+ # :repeated_permutation,
153
+ # :replace,
154
+ # :respond_to?,
155
+ # :reverse,
156
+ # :reverse!,
157
+ # :reverse_each,
158
+ # :rindex,
159
+ # :rotate,
160
+ # :rotate!,
161
+ # :sample,
162
+ # :select,
163
+ # :select!,
164
+ # :send,
165
+ # :shelljoin,
166
+ # :shift,
167
+ # :shuffle,
168
+ # :shuffle!,
169
+ # :singleton_class,
170
+ # :singleton_method,
171
+ # :singleton_methods,
172
+ # :size,
173
+ # :slice,
174
+ # :slice!,
175
+ # :slice_after,
176
+ # :slice_before,
177
+ # :slice_when,
178
+ # :sort,
179
+ # :sort!,
180
+ # :sort_by,
181
+ # :sort_by!,
182
+ # :sum,
183
+ # :taint,
184
+ # :tainted?,
185
+ # :take,
186
+ # :take_while,
187
+ # :tap,
188
+ # :then,
189
+ # :to_a,
190
+ # :to_ary,
191
+ # :to_enum,
192
+ # :to_h,
193
+ # :to_json,
194
+ # :to_s,
195
+ # :to_set,
196
+ # :transpose,
197
+ # :trust,
198
+ # :union,
199
+ # :uniq,
200
+ # :uniq!,
201
+ # :unshift,
202
+ # :untaint,
203
+ # :untrust,
204
+ # :untrusted?,
205
+ # :values_at,
206
+ # :yield_self,
207
+ # :zip,
208
+ # :|]
@@ -0,0 +1,3 @@
1
+ module Reclone
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,31 @@
1
+ Documentation: https://bundler.io/guides/creating_gem.html
2
+
3
+ Reclone
4
+
5
+ - user runs `reclone` via terminal (duh)
6
+ - gets username?
7
+ -- check to see if user name exists
8
+ - gets password
9
+ - gets repo range (50 or 100 most recent repos)
10
+ -- potential cap on range depending github api
11
+
12
+ - gets directory to clone to
13
+ -- check to see if repo exists?
14
+
15
+
16
+ - clones them bishes
17
+ -- if just one clone, ask the user to clone manually
18
+ -- let user know if repo range is outside of api rate limiting
19
+
20
+ Potential classes
21
+ - cli class
22
+ refer to old code for idea?
23
+
24
+ - user class
25
+ #user_name
26
+ checks api class to see if user_name exists?
27
+
28
+
29
+ #directory?
30
+
31
+ - github api?
@@ -0,0 +1,42 @@
1
+ require_relative 'lib/reclone/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "reclone"
5
+ spec.version = Reclone::VERSION
6
+ spec.authors = ["dwieb"]
7
+ spec.email = ["dwayne.harmon@gmail.com"]
8
+
9
+ spec.summary = %q{Re-clone your most recent 100 repos from GitHub.}
10
+ spec.description = %q{See summary.}
11
+
12
+ spec.homepage = "https://github.com/dwyn/reclone"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
15
+
16
+ # spec.metadata["allowed_push_host"] = "https://google.com'"
17
+
18
+ # spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = "https://github.com/dwyn/reclone"
20
+ spec.metadata["changelog_uri"] = "https://github.com/dwyn/reclone/blob/master/CODE_OF_CONDUCT.md"
21
+
22
+ # Specify which files should be added to the gem when it is released.
23
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ #* Added Gems
32
+ spec.add_development_dependency "bundler", "~> 2.1.4"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ # spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_dependency "octokit", "~> 4.0"
36
+ spec.add_dependency "net-ping"
37
+ spec.add_dependency "pry"
38
+ spec.add_dependency "tty"
39
+ spec.add_dependency "clamp"
40
+ spec.add_dependency "git", '~> 1.3'
41
+ spec.add_dependency "dotenv", '~> 2.7', '>= 2.7.6'
42
+ end
metadata ADDED
@@ -0,0 +1,197 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: reclone
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - dwieb
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-08-18 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: 2.1.4
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.1.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: octokit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: net-ping
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tty
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: clamp
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: git
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.3'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.3'
125
+ - !ruby/object:Gem::Dependency
126
+ name: dotenv
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.7'
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: 2.7.6
135
+ type: :runtime
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '2.7'
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: 2.7.6
145
+ description: See summary.
146
+ email:
147
+ - dwayne.harmon@gmail.com
148
+ executables: []
149
+ extensions: []
150
+ extra_rdoc_files: []
151
+ files:
152
+ - ".gitignore"
153
+ - ".rspec"
154
+ - ".travis.yml"
155
+ - CHANGELOG.MD
156
+ - CODE_OF_CONDUCT.md
157
+ - Gemfile
158
+ - Gemfile.lock
159
+ - LICENSE.txt
160
+ - README.md
161
+ - Rakefile
162
+ - bin/console
163
+ - bin/reclone
164
+ - bin/setup
165
+ - lib/reclone.rb
166
+ - lib/reclone/cli.rb
167
+ - lib/reclone/octokitty.rb
168
+ - lib/reclone/user.rb
169
+ - lib/reclone/version.rb
170
+ - notes.md
171
+ - reclone.gemspec
172
+ homepage: https://github.com/dwyn/reclone
173
+ licenses:
174
+ - MIT
175
+ metadata:
176
+ source_code_uri: https://github.com/dwyn/reclone
177
+ changelog_uri: https://github.com/dwyn/reclone/blob/master/CODE_OF_CONDUCT.md
178
+ post_install_message:
179
+ rdoc_options: []
180
+ require_paths:
181
+ - lib
182
+ required_ruby_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: 2.3.0
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ requirements: []
193
+ rubygems_version: 3.0.6
194
+ signing_key:
195
+ specification_version: 4
196
+ summary: Re-clone your most recent 100 repos from GitHub.
197
+ test_files: []