orlando_tech_meetups 0.1.9 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a755cf8b377a9b3f5b77dd281f41e1f34b27685
4
- data.tar.gz: f1f33084294417179c4723a87a92a7626c5ebba4
3
+ metadata.gz: 2173318aa5c9c4310ee40e1a2f556478317b1b99
4
+ data.tar.gz: 00d44452f962bb541e0b3cfd70582c68c8ea26dd
5
5
  SHA512:
6
- metadata.gz: 58eb16a30e1898b392dbf2389e501eae00d5c11cbf0ae79c94c5a57baa86c811507cea73c2dcca049d49ac05fe6ca189e016287b8af1e5b370847d9c54e0a7fa
7
- data.tar.gz: dffebac07b32930a1c2dae285567537b44033debc68dd8c9ebd369b1d6892faf5f122e066d170684ff27f3276115954fee200d02d3f2bf84351183f3b9b5abce
6
+ metadata.gz: 25ffadfd43a610850f85e16eb6c512e979fbaf8341bf4c96cadf4af36b9663d1b3c6dd8cb7704a9eea8e26c44958efa386353c7068ad7900a38ad25983421bd7
7
+ data.tar.gz: 01c7347b9529b947044b3ca694ed87c0c0523c691bc059d2ac94ad5ca5dd5448b7e0f8e3d3a3d6613794d5c7f2e8a1aaa6800c75c3638666a8ee4ce4184a5527
data/README.md CHANGED
@@ -10,6 +10,7 @@ Add this line to your application's Gemfile:
10
10
  gem 'orlando_tech_meetups'
11
11
  ```
12
12
 
13
+
13
14
  And then execute:
14
15
 
15
16
  $ bundle
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "orlando_tech_meetups"
3
+ require 'bin/console'
4
+ require 'orlando_tech_meetups'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require_relative "../lib/orlando_tech_meetups"
3
4
 
4
- require "bundler/setup"
5
- require "orlando_tech_meetups"
6
5
 
7
6
 
8
7
  OrlandoTechMeetups::CLI.new.call
@@ -3,4 +3,5 @@ require 'nokogiri'
3
3
 
4
4
  require_relative "./orlando_tech_meetups/version"
5
5
  require_relative './orlando_tech_meetups/cli'
6
- require_relative './orlando_tech_meetups/meetups'
6
+ require_relative './orlando_tech_meetups/scraper'
7
+ require_relative './orlando_tech_meetups/meetups'
@@ -11,17 +11,12 @@ class OrlandoTechMeetups::CLI
11
11
  if input.to_i > 0
12
12
  the_group = @meetups[input.to_i-1]
13
13
  puts "#{the_group.name}"
14
- puts "#{the_group.about}"
15
14
  puts "The next meetup is: #{the_group.next_meetup}"
16
- if the_group.next_meetup < 0.to_s
17
- puts "Sorry, there's no meetup planned yet!"
18
- end
19
- puts "\n"
20
15
  puts "#{the_group.url}"
21
16
  puts "Copy and paste the link above into your browser to check it out and learn more!"
22
17
  puts "To go back to the menu, enter 'menu'. To exit, type 'exit'."
23
18
  elsif input == "menu"
24
- list_meetups
19
+ meetup
25
20
  else
26
21
  puts "Hope to see you soon!"
27
22
  end
@@ -30,14 +25,15 @@ class OrlandoTechMeetups::CLI
30
25
 
31
26
  def list_meetups
32
27
  puts "Hello and Welcome to the Orlando Tech Scene!"
33
- puts "Enter the number of the meetup group you're interested in learning about."
28
+ puts "Enter the number of the meetup group you're interested in going to:"
34
29
  meetup
35
30
  end
36
31
 
37
32
  def meetup
33
+ OrlandoTechMeetups::Meetups.scrape_meetups
38
34
  @meetups = OrlandoTechMeetups::Meetups.all
39
- @meetups.each.with_index(1) do |meetups, i|
40
- puts "#{i}. #{meetups.name}"
35
+ @meetups.each.with_index(1) do |meetup, i|
36
+ puts "#{i}. #{meetup.name}"
41
37
  end
42
38
  end
43
39
 
@@ -1,220 +1,35 @@
1
1
  class OrlandoTechMeetups::Meetups
2
- attr_accessor :name, :about, :next_meetup, :url
2
+ attr_accessor :name, :next_meetup, :url
3
+
4
+ @@all = []
3
5
 
4
6
  def self.all
5
- self.meetup_scraper
7
+ @@all
6
8
  end
7
9
 
8
- def self.meetup_scraper
9
- meetups = []
10
- meetups << self.orlando_tech
11
- meetups << self.orlando_developers_meetup
12
- meetups << self.code_for_orlando
13
- meetups << self.iron_yard
14
- meetups << self.front_end_orlando
15
- meetups << self.downtown_ux
16
- meetups << self.orlando_python_group
17
- meetups << self.orlando_mongodb_group
18
- meetups << self.orlando_ruby_group
19
- meetups << self.orlando_php_group
20
- meetups << self.central_florida_android_group
21
- meetups << self.orlandojs
22
- meetups << self.orlando_coding_dojo
23
- meetups << self.raspberry_pi_group
24
- meetups << self.orlando_ios_dev_group
25
- meetups << self.iot_orlando
26
- meetups
10
+ def save
11
+ @@all << self
27
12
  end
28
13
 
29
- def self.orlando_tech
30
- doc = Nokogiri::HTML(open('http://www.meetup.com/Orlando-Tech/'))
31
- meetup = self.new
32
- meetup.name = doc.search("h1 span").text
33
- meetup.about = <<-DOC
34
- Orlando Tech is a community-built organization that connects, promotes and fosters the growth of technology companies in Orlando. We host the monthly Orlando Tech Meetup, a platform for technologists, entrepreneurs, and companies to share their products. Since our founding in 2011, OTM has grown to over 2100 members and monthly attendance exceeding 200+. Though we like to highlight homegrown Orlando-based companies and entrepreneurs, our members come from all over Florida. Come check out Orlando!
35
- DOC
36
- meetup.next_meetup = doc.search("div li time span").first.text.strip
37
- meetup.url = "http://www.meetup.com/Orlando-Tech/"
38
- meetup
39
- end
40
-
41
- def self.orlando_developers_meetup
42
- doc = Nokogiri::HTML(open('http://www.meetup.com/OrlandoDevs/'))
43
- meetup = self.new
44
- meetup.name = doc.search("h1 span").text
45
- meetup.about = <<-DOC
46
- The Orlando Developers User Group is for developers of all skill levels in the Orlando area to come learn about improving yourself as a developer. We focus primarily on professional development and soft skills, but we will also be featuring technical talks and presentations on various different subjects that our community is interested in.
47
- DOC
48
- meetup.next_meetup = doc.search("div li time span").first.text.strip
49
- meetup.url = "http://www.meetup.com/OrlandoDevs/"
50
- meetup
51
- end
52
-
53
- def self.code_for_orlando
54
- doc = Nokogiri::HTML(open('http://www.meetup.com/Code-For-Orlando/'))
55
- meetup = self.new
56
- meetup.name = doc.search("h1 span").text
57
- meetup.about = <<-DOC
58
- Want To Help Your City? Good, we could use your help. We are working to become an official Code for America Brigade, which means we're volunteers that contribute our talents toward improving the way our local governments and community organizations use the web. Brigade is about action and you're here because you are someone who takes action. See what kind of things brigades do, or watch the inspirational TED talk given by Jennifer Pahlka, the founder of Code for America.
59
- DOC
60
- meetup.next_meetup = doc.search("div li time span").first.text.strip
61
- meetup.url = "http://www.meetup.com/Code-For-Orlando/"
62
- meetup
63
- end
64
-
65
- def self.iron_yard
66
- doc = Nokogiri::HTML(open('http://www.meetup.com/The-Iron-Yard-Orlando/'))
67
- meetup = self.new
68
- meetup.name = doc.search("h1 span").text
69
- meetup.about = <<-DOC
70
- The Iron Yard exists to create exceptional growth and mentorship for people and their ideas through tech-focused education. We're passionate about the communities we exist in and strive to be good citizens of the tech industry. Our doors are open to everyone who wants to learn about technology, from kids to people who want to change careers. Come to one of our events to see what all of the excitement is about.
71
- DOC
72
- meetup.next_meetup = doc.search("div li time span").first.text.strip
73
- meetup.url = "http://www.meetup.com/The-Iron-Yard-Orlando/"
74
- meetup
75
- end
76
-
77
- def self.front_end_orlando
78
- doc = Nokogiri::HTML(open('http://www.meetup.com/Front-End-Orlando/'))
79
- meetup = self.new
80
- meetup.name = doc.search("h1 span").text
81
- meetup.about = <<-DOC
82
- This group is for Orlando Front End Developers who work with HTML/CSS/Javascript regularly. Newbies are welcome too! We're all here to learn :)
83
- DOC
84
- meetup.next_meetup = doc.search("div li time span").first.text.strip
85
- meetup.url = "http://www.meetup.com/Front-End-Orlando/"
86
- meetup
87
- end
88
-
89
- def self.downtown_ux
90
- doc = Nokogiri::HTML(open('http://www.meetup.com/Downtown-UX-Meetup/'))
91
- meetup = self.new
92
- meetup.name = doc.search("h1 span").text
93
- meetup.about = <<-DOC
94
- Our mission is to create opportunities for anyone to learn, discuss, and share knowledge about the field of User Experience. We try to create opportunities for our community to learn about tools and techniques for UX Design from each other. Typically our meetups have a presentation paired with a workshop so that we can both learn and then do. We hope you will join us.
95
- DOC
96
- meetup.next_meetup = doc.search("div li time span").first.text.strip
97
- meetup.url = "http://www.meetup.com/Downtown-UX-Meetup/"
98
- meetup
99
- end
100
-
101
- def self.orlando_python_group
102
- doc = Nokogiri::HTML(open('http://www.meetup.com/OrlandoPython/'))
103
- meetup = self.new
104
- meetup.name = doc.search("h1 span").text
105
- meetup.about = <<-DOC
106
- The OrlandoPy(thon) User Group is for users, enthusiasts, and students in Orlando, Florida, interested in the Python computer programming language. We meet monthly to discuss and present emerging issues and interesting projects in Python, practice our skill, and trade stories from the workforce. All skill levels are welcome.
107
- DOC
108
- meetup.next_meetup = doc.search("ul script h2").text.strip
109
- meetup.url = "http://www.meetup.com/OrlandoPython/"
110
- meetup
111
- end
112
-
113
- def self.orlando_mongodb_group
114
- doc = Nokogiri::HTML(open('http://www.meetup.com/Orlando-MongoDB-User-Group/'))
115
- meetup = self.new
116
- meetup.name = doc.search("h1 span").text
117
- meetup.about = <<-DOC
118
- This group is a place for developers, systems admins, and tech enthusiasts to learn more about the open source, document-oriented database MongoDB. MongoDB is the leading NoSQL database and many organizations are adopting this technology. If you are facing challenges with MySQL or Postgres or Oracle and want to explore a more flexible, scalable alternative, please join us at one of our sessions.
119
- DOC
120
- meetup.next_meetup = doc.search("div li time span").first.text.strip
121
- meetup.url = "http://www.meetup.com/Orlando-MongoDB-User-Group/"
122
- meetup
123
- end
124
-
125
- def self.orlando_ruby_group
126
- doc = Nokogiri::HTML(open('http://www.meetup.com/Orlando-Ruby/'))
127
- meetup = self.new
128
- meetup.name = doc.search("h1 span").text
129
- meetup.about = <<-DOC
130
- Dedicated to educate about the Ruby language, and associated technologies. We typically meet on the second Thursday of the month providing a presentation and networking.
131
- DOC
132
- meetup.next_meetup = doc.search("div li time span").first.text.strip
133
- meetup.url = "http://www.meetup.com/Orlando-Ruby/"
134
- meetup
135
- end
136
-
137
- def self.orlando_php_group
138
- doc = Nokogiri::HTML(open('http://www.meetup.com/OrlandoPHP/'))
139
- meetup = self.new
140
- meetup.name = doc.search("h1 span").text
141
- meetup.about = <<-DOC
142
- The Orlando PHP User Group is for web development professionals looking to discuss and learn about the C-type programming language PHP, which is used in a variety of common web applications. We meet on the first Wednesday of each month to present and discuss projects we're working on and trade stories from the workforce. All skill levels are welcome.
143
- DOC
144
- meetup.next_meetup = doc.search("ul script h2").text.strip
145
- meetup.url = "http://www.meetup.com/OrlandoPHP/"
146
- meetup
147
- end
148
-
149
- def self.central_florida_android_group
150
- doc = Nokogiri::HTML(open('http://www.meetup.com/Central-Florida-Android-Developers-Group/'))
151
- meetup = self.new
152
- meetup.name = doc.search("h1 span").text
153
- meetup.about = <<-DOC
154
- A group for developers of all skill levels to network, share information, and learn from each other. We also host the http://www.meetup.com/Orlando-iOS-Developer... at our offices in downtown Orlando ( http:www.justecho.com ) and will regularly meet for group discussions, network or job opportunities, and to share ideas and whatever projects group members are working on. Sorry but due to current membership suggestions, no recruiters or non-tech attendees.
155
- DOC
156
- meetup.next_meetup = doc.search("ul script h2").text.strip
157
- meetup.url = "http://www.meetup.com/Central-Florida-Android-Developers-Group/"
158
- meetup
159
- end
14
+ MEETUP_URL = [
15
+ "http://www.meetup.com/Code-For-Orlando/",
16
+ "http://meetup.com/orlando-tech/",
17
+ "http://www.meetup.com/The-Iron-Yard-Orlando/",
18
+ "http://www.meetup.com/Front-End-Orlando/",
19
+ "http://www.meetup.com/Downtown-UX-Meetup/",
20
+ "http://www.meetup.com/Orlando-Ruby/",
21
+ "http://www.meetup.com/OrlandoJS/",
22
+ "http://www.meetup.com/orlandodojo/",
23
+ "http://www.meetup.com/Central-Florida-RPi-Users-Group/",
24
+ "http://www.meetup.com/iot-orlando/"
25
+ ]
160
26
 
161
- def self.orlandojs
162
- doc = Nokogiri::HTML(open('http://www.meetup.com/OrlandoJS/'))
163
- meetup = self.new
164
- meetup.name = doc.search("h1 span").text
165
- meetup.about = <<-DOC
166
- The Orlando JavaScript group is a place to talk about all things JavaScript.
167
- DOC
168
- meetup.next_meetup = doc.search("div li time span").first.text.strip
169
- meetup.url = "http://www.meetup.com/OrlandoJS/"
170
- meetup
171
- end
172
-
173
- def self.orlando_coding_dojo
174
- doc = Nokogiri::HTML(open('http://www.meetup.com/orlandodojo/'))
175
- meetup = self.new
176
- meetup.name = doc.search("h1 span").text
177
- meetup.about = <<-DOC
178
- The Orlando Coding Dojo is the dedicated group for practicing the craft of test-driven development while pair programming. We meet biweekly in various places around the Orlando area, pick a programming language to use, a problem to attempt to solve, and briefly discuss a proposed implementation to follow.
179
- DOC
180
- meetup.next_meetup = doc.search("div li time span").first.text.strip
181
- meetup.url = "http://www.meetup.com/orlandodojo/"
182
- meetup
183
- end
27
+ def self.scrape_meetups
28
+ s = OrlandoTechMeetups::Scraper.new
29
+ MEETUP_URL.each do |url|
30
+ s.scraper(url)
31
+ end
32
+ end
184
33
 
185
- def self.raspberry_pi_group
186
- doc = Nokogiri::HTML(open('http://www.meetup.com/Central-Florida-RPi-Users-Group/'))
187
- meetup = self.new
188
- meetup.name = doc.search("h1 span").text
189
- meetup.about = <<-DOC
190
- The Central Florida Raspberry Pi Users Group’s mission includes creating, and maintaining an active user and developer community for the Raspberry Pi platform in the Central Florida area. Meetups for the Raspberry Pi are called Raspberry Jams. We have been meeting at different venues in order to cover more territory. Be sure to check out our next Raspberry Jam!
191
- DOC
192
- meetup.next_meetup = doc.search("div li time span").first.text.strip
193
- meetup.url = "http://www.meetup.com/Central-Florida-RPi-Users-Group/"
194
- meetup
195
- end
196
34
 
197
- def self.orlando_ios_dev_group
198
- doc = Nokogiri::HTML(open('http://www.meetup.com/Orlando-iOS-Developer-Group/'))
199
- meetup = self.new
200
- meetup.name = doc.search("h1 span").text
201
- meetup.about = <<-DOC
202
- This group is an attempt to organize iOS developers in the Central Florida area. The group's purpose is to help developers further their iOS, iPhone, iPad education, and network with fellow iOS developers in the area. Anyone who wants to learn, teach, and get to know your fellow geeks should join.
203
- DOC
204
- meetup.next_meetup = doc.search("ul script h2").text.strip
205
- meetup.url = "http://www.meetup.com/Orlando-iOS-Developer-Group/"
206
- meetup
207
- end
208
-
209
- def self.iot_orlando
210
- doc = Nokogiri::HTML(open('http://www.meetup.com/iot-orlando/'))
211
- meetup = self.new
212
- meetup.name = doc.search("h1 span").text
213
- meetup.about = <<-DOC
214
- This is the place for people with a project or product idea they want to have connected to the internet. IoT has a lot of potential for new and exciting devices, with so many hardware and software options out there it can be difficult to get started or know what technology is right for your project. As a group we can share knowledge and learn together to unlock the IoT potential. Designers, programmers, engineers and entrepreneurs are all welcome. We will offer introductory overviews of the relevant technologies but will also generate small groups building out their ideas.
215
- DOC
216
- meetup.next_meetup = doc.search("div li time span").first.text.strip
217
- meetup.url = "http://www.meetup.com/iot-orlando/"
218
- meetup
219
- end
220
- end
35
+ end
@@ -0,0 +1,14 @@
1
+ class OrlandoTechMeetups::Scraper
2
+
3
+ def scraper(meetup_url)
4
+ doc = Nokogiri::HTML(open(meetup_url))
5
+ doc.css('html').each do |doc|
6
+ new_meetup = OrlandoTechMeetups::Meetups.new
7
+ new_meetup.name = doc.css("h1 span").text
8
+ new_meetup.next_meetup = doc.search("div li time span").first.text.strip
9
+ new_meetup.url = doc.css('div a').map { |link| link['href'] }.first
10
+ new_meetup.save
11
+ end
12
+ end
13
+
14
+ end
@@ -1,3 +1,3 @@
1
1
  module OrlandoTechMeetups
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
 
29
29
  spec.add_dependency "nokogiri", "~> 1.6.7.2"
30
-
30
+
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orlando_tech_meetups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - joshnevius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,6 +75,7 @@ files:
75
75
  - lib/orlando_tech_meetups.rb
76
76
  - lib/orlando_tech_meetups/cli.rb
77
77
  - lib/orlando_tech_meetups/meetups.rb
78
+ - lib/orlando_tech_meetups/scraper.rb
78
79
  - lib/orlando_tech_meetups/version.rb
79
80
  - orlando_tech_meetups.gemspec
80
81
  homepage: https://github.com/joshnevius/orlando-tech-meetups-cli-gem