Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: jenots999/export_google
base: f79c49749f
...
head fork: jenots999/export_google
compare: 5b84160e00
  • 1 commit
  • 3 files changed
  • 0 commit comments
  • 1 contributor
9 app/controllers/doit_controller.rb
View
@@ -46,7 +46,7 @@ def get_code
child = fork do
@@def_token_obj = @@client.auth_code.get_token(get_code, { :redirect_uri => 'http://localhost:3000',
:token_method => :post })
- while true do
+ 1.times do
conan(format_stories, get_stats)
end
end
@@ -60,10 +60,7 @@ def conan(projects, projects_stats)
proj_stats = projects_stats[i]
token_obj = @@def_token_obj
token_obj = refresh_access_token_do_it(token_obj)
- puts "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
token = token_obj.token
- puts token
- puts "_________________________________________________________________________________"
@access_token_obj = OAuth2::AccessToken.new(@@client, token)
puts "sak rakstit projektu"
@@ -71,11 +68,11 @@ def conan(projects, projects_stats)
puts "#########################################################################"
if exist(@access_token_obj, project_id)
doit_write(@access_token_obj, project_id, proj, proj_stats)
- puts "sarakstija"
+ puts "sarakstija projktu #{project_id}"
else
project = Project.new(@access_token_obj, project_id)
doit_write(@access_token_obj, project_id, proj, proj_stats)
- puts "sarakstija"
+ puts "sarakstija projktu #{project_id}"
end
i +=1
end
6 lib/google.rb
View
@@ -95,7 +95,7 @@ def create_worksheet(post_to_url, worksheet_title, access_token_obj)
doc2 = Nokogiri::Slop(response2.body)
link = doc.link(:css => "[rel='http://schemas.google.com/spreadsheets/2006#cellsfeed']")["href"]
link2 = doc2.link(:css => "[rel='http://schemas.google.com/spreadsheets/2006#cellsfeed']")["href"]
- cols = %w{id project_id story_type url estimate current_state description name requested_by created_at updated_at accepted_at labels tasks}
+ cols = %w{id project_id story_type url estimate current_state description name requested_by created_at updated_at accepted_at releas_at labels activity tasks}
stats_cols = ["date", "feature count", "feature points sum", "accepted feature count", "accepted feature points sum", "bug count", "accepted bug count", "chore count"]
cell_feed_loop(link, cols, access_token_obj)
@@ -263,9 +263,7 @@ def write_data_doit(def_link, array_of_data)
col += 1
end
row +=1
- if row == 4
- break
- end
+
end
end
30 lib/pivotal.rb
View
@@ -63,26 +63,42 @@ def format_stories()
doc = Nokogiri::XML(story.to_s)
index = 0
story = []
- status = 0
+ labels = 0
+ activity = 0
+ deadline = 0
doc.xpath("//story").children.each do |line|
index +=1
if index % 2 == 0
+ story << line.content
if line.node_name == "labels"
- status = 1
+ labels = 1
+ end
+ if line.node_name == "deadline"
+ deadline = 1
+ end
+ if line.node_name == "notes"
+ activity = 1
end
- story << line.content
-
end
+
+
end
unless story[2] == "feature"
story.insert(4, "")
end
- unless story[5] == 'accepted'
+ unless story[5] == 'accepted'
story.insert(11, "")
end
- if status == 0
- story.insert(12, "")
+ if deadline == 0
+ story.insert(12, "release_at")
+ end
+ if labels == 0
+ story.insert(13, "la")
+ end
+ if activity == 0
+ story.insert(14, "acti")
end
+
stories << story
story = []
end

No commit comments for this range

Something went wrong with that request. Please try again.