dobedobedo 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/dobedobedo.gemspec +1 -1
- data/example.rb +34 -0
- data/lib/dobedobedo/version.rb +1 -1
- metadata +3 -2
data/dobedobedo.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["kjp@brightleafsoftware.com"]
|
11
11
|
gem.description = %q{Interact with Do.com}
|
12
12
|
gem.summary = %q{Gem interacts with Do.com}
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "https://github.com/noeticpenguin/Dobedobedo"
|
14
14
|
|
15
15
|
gem.add_dependency "oauth2"
|
16
16
|
gem.add_dependency "bundler"
|
data/example.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'dobedobedo'
|
2
|
+
require 'ap'
|
3
|
+
include Dobedobedo
|
4
|
+
|
5
|
+
CLIENT_ID = 'your client id here'
|
6
|
+
CLIENT_SECRET = 'Never gonna give it out, never gonna show you mine.... Your secret here'
|
7
|
+
USERNAME = 'Your@email.here.com'
|
8
|
+
PASSWORD = 'Awe$som3P4ssw0rd'
|
9
|
+
|
10
|
+
connection = Dobedobedo::Connection.new(:client_id => CLIENT_ID,
|
11
|
+
:client_secret => CLIENT_SECRET,
|
12
|
+
:username => USERNAME,
|
13
|
+
:password => PASSWORD)
|
14
|
+
puts "Workspaces available to this Account:"
|
15
|
+
ap connection.workspaces.map { |e| e.name }
|
16
|
+
puts "Selecting the first Workspace!"
|
17
|
+
workspace = connection.by_name('Rails2DF')
|
18
|
+
puts "Projects in the first workspace"
|
19
|
+
ap workspace.projects.map { |e| e.name }
|
20
|
+
puts "Selecting the second project!"
|
21
|
+
project = workspace.projects[1]
|
22
|
+
puts "Tasks for the second project!"
|
23
|
+
ap project.tasks.map { |e| "#{e.name} -- is closed? #{e.closed}" }
|
24
|
+
puts "Time to Create a new Task"
|
25
|
+
puts "Lets call it 'Win Cloudspokes DO Challenge'"
|
26
|
+
nTask = Dobedobedo::Task.new(connection.token, workspace.id, project.id)
|
27
|
+
nTask.name = "Win Cloudspokes DO challenge. "
|
28
|
+
nTask.update
|
29
|
+
puts "Task created, lets see if it shows up!"
|
30
|
+
ap project.tasks.map { |e| "#{e.name} -- is closed? #{e.closed}" }
|
31
|
+
puts "There it is! and it's even marked as still to do!"
|
32
|
+
puts "Lets just call this one a sure thing and close that task!"
|
33
|
+
nTask.close
|
34
|
+
ap project.tasks.select { |s| s.id == nTask.id }.map { |e| "#{e.name} -- is closed? #{e.closed}" }
|
data/lib/dobedobedo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dobedobedo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- README.md
|
73
73
|
- Rakefile
|
74
74
|
- dobedobedo.gemspec
|
75
|
+
- example.rb
|
75
76
|
- lib/dobedobedo.rb
|
76
77
|
- lib/dobedobedo/alert.rb
|
77
78
|
- lib/dobedobedo/auth.rb
|
@@ -84,7 +85,7 @@ files:
|
|
84
85
|
- lib/dobedobedo/user.rb
|
85
86
|
- lib/dobedobedo/version.rb
|
86
87
|
- lib/dobedobedo/workspace.rb
|
87
|
-
homepage:
|
88
|
+
homepage: https://github.com/noeticpenguin/Dobedobedo
|
88
89
|
licenses: []
|
89
90
|
post_install_message:
|
90
91
|
rdoc_options: []
|