gistmeetup 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gistmeetup.rb +21 -1
- metadata +34 -2
data/lib/gistmeetup.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
require 'gist'
|
2
2
|
require 'rmeetup'
|
3
|
+
require 'parse-ruby-client'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
Parse.init :application_id => "H4kSq1roztLdYcKu6IdixJgbVtzaoxlEfagYiRYA",
|
7
|
+
:api_key => "LGcTEzAnxzWUTngaXzdjy4FUixwUSeTJuy8sw56d"
|
3
8
|
|
4
9
|
module Gistmeetup
|
5
10
|
extend self
|
@@ -30,11 +35,26 @@ module Gistmeetup
|
|
30
35
|
else
|
31
36
|
nextEvent = events[0]
|
32
37
|
url = ret["html_url"]
|
33
|
-
RMeetup::Client.post(:event_comment, {:event_id => "#{nextEvent.id}", :comment => "#{comment} - #{url}" })
|
38
|
+
response = RMeetup::Client.post(:event_comment, {:event_id => "#{nextEvent.id}", :comment => "#{comment} - #{url}" })
|
39
|
+
saveMetaData(meetup, comment, nextEvent, url, response)
|
34
40
|
"Posted to github on '#{url}' and link to it on '#{meetup}' comments"
|
35
41
|
end
|
36
42
|
end
|
37
43
|
|
44
|
+
def saveMetaData(meetup, comment, nextEvent, url, response)
|
45
|
+
json = JSON.parse(response.body)
|
46
|
+
|
47
|
+
code = Parse::Object.new("Code")
|
48
|
+
code["meetup"] = meetup
|
49
|
+
code["comment"] = comment
|
50
|
+
code["nextEvent_id"] = nextEvent.id
|
51
|
+
code["nextEvent_name"] = nextEvent.name
|
52
|
+
code["member_id"] = json["member_id"].to_s
|
53
|
+
code["member_name"] = json["member_name"]
|
54
|
+
code["event_comment_id"] = json["event_comment_id"].to_s
|
55
|
+
result = code.save
|
56
|
+
end
|
57
|
+
|
38
58
|
def login!(credentials={})
|
39
59
|
Gist.login!(credentials)
|
40
60
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gistmeetup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,6 +43,38 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '3.0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: parse-ruby-client
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.2.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: json
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.8.1
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.8.1
|
46
78
|
description: A gem that uploads to gist and meetup
|
47
79
|
email: joshua.calloway@gmail.com
|
48
80
|
executables:
|
@@ -73,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
105
|
version: '0'
|
74
106
|
requirements: []
|
75
107
|
rubyforge_project:
|
76
|
-
rubygems_version: 1.8.
|
108
|
+
rubygems_version: 1.8.25
|
77
109
|
signing_key:
|
78
110
|
specification_version: 3
|
79
111
|
summary: gistmeetup
|