teamlab 0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ require 'rspec'
2
+ require 'support/http_data'
3
+ require 'teamlab'
@@ -0,0 +1,149 @@
1
+ SERVER = ''
2
+ USERNAME = ''
3
+ PASSWORD = ''
4
+
5
+ def args
6
+ []
7
+ end
8
+
9
+ def random_word(length, capitalize = false)
10
+ capitalize ? (0...length).map { ('a'..'z').to_a[rand(26)] }.join.capitalize : (0...length).map { ('a'..'z').to_a[rand(26)] }.join
11
+ end
12
+
13
+ def random_email
14
+ random_word(7) + '@sharklasers.com'
15
+ end
16
+
17
+ #region OPTIONS
18
+ #region People
19
+ SEARCH_USER_NAME = 'Allison'
20
+ USER_FILTER = { activationStatus: 1 }
21
+ USER_ID = 'efcb452b-2be3-4311-b539-fabad4d42e95'#'e83cceef-2cbf-4cdf-9a4c-fea4e810705b'
22
+ USERNAME_FOR_OPERATIONS = 'kcwijpgg'
23
+ USER_STATUS = 'Active'
24
+ SEARCH_QUERY = random_word(7, true)
25
+ USER_EMAIL = random_email
26
+ IS_VISITOR = false
27
+ NEW_USER_FIRSTNAME = random_word(7, true)
28
+ NEW_USER_LASTNAME = random_word(7, true)
29
+ USER_CONTACTS = [
30
+ { type: 'skype', value: 'mondovoshka' },
31
+ { type: 'email', value: 'mondovoshka@mail.ru' }
32
+ ]
33
+ FEW_USER_IDS = %w(37f5ce64-9db1-4df9-8b93-436e39721b4d 6d5c7d2f-b81e-4afb-b5d6-cd6ef2426e35)
34
+ USERS_TO_DELETE = ['864663e3-6135-4252-a11c-e507f96e59a9']
35
+ USER_TYPE = 'User'
36
+ PATH_TO_IMAGE = 'http://ic.pics.livejournal.com/scryp/14761862/5478/5478_original.jpg'
37
+ #endregion
38
+
39
+ #region Group
40
+ GROUP_ID = '06a9bf1b-3354-4347-805c-934265b62773'
41
+ GROUP_NAME = random_word(7)
42
+ GROUP_ID_FOR_OPERATIONS = 'd868c0fb-d669-495f-aa00-1279395285ea'
43
+ GROUP_UPDATE_OPTIONS = { groupManager: USER_ID, groupName: GROUP_NAME, members: FEW_USER_IDS }
44
+ GROUP_ID_TO_DELETE = '97b92796-79b1-4688-869e-1d09487d91d8'
45
+ #endregion
46
+
47
+ #regions Settings
48
+ SETTINGS_ENTITY_IDS = ['ea942538-e68e-4907-9394-035336ee0ba8', '28b10049-dd20-4f54-b986-873bc14ccfc7']
49
+ SETTINGS_TEST_USER = '27cd9da5-4f97-4335-ac45-55dd05d96d89'
50
+ SETTINGS_TALK_MODULE_ID = 'bf88953e-3c43-4850-a3fb-b1e43ad53a3e'
51
+ SETTINGS_VERSION = 2
52
+ SETTINGS_FOR_TALK = { enabled: true }
53
+ #endregion
54
+
55
+ #region Files
56
+ FOLDER_COMMON_DOCS_ID = '225508'
57
+ FOLDER_TITLE = random_word(10)
58
+ FOLDER_FOR_OPERATIONS_ID = '168228'
59
+ FILE_FOR_OPERATIONS_ID = '3434235'
60
+ FILE_FOR_OPERATIONS_VERSION = 1
61
+ FILES_SHARE_TYPE = 'Read'
62
+ FILE_TO_UPLOAD = '/home/zagudaev-2/mods.txt'
63
+ FILE_MORE_THAN_5_MB = '/mnt/data_share/Files/PDF/AllPDF/600 Essential Words for the TOEIC Test.pdf'
64
+ FILE_SIZE_IN_BYTES = 107374182.4
65
+ FEW_FILES_IDS = [3482982, 3482961, 3482965]
66
+ NEW_FILE_NAME = random_word(8)
67
+ NEW_FILE_CONTENT = random_word(40)
68
+ THIRD_PARTY_SERVICE = 'Box.com'
69
+ THIRD_PARTY_LOGIN = 'teamlab.ruby@gmail.com'
70
+ THIRD_PARTY_PASSWORD = '123456'
71
+ THIRD_PARTY_LOGIN_DATA = {login: THIRD_PARTY_LOGIN, password: THIRD_PARTY_PASSWORD}
72
+ THIRD_PARTY_FOLDER_ID = '1042248535'
73
+ IGNORE_COINCIDENCE_FILES = true
74
+ DATA_TO_IMPORT = []
75
+ FILE_TO_DELETE_ID = '3482889'
76
+ FOLDER_TO_DELETE_ID = '1555056'
77
+ ACCESS_TYPE = 1
78
+ NOTIFY_USER = true
79
+ NOTIFICATION_MESSAGE = random_word(10)
80
+ PROVIDER_ID = '12137'
81
+ #endregion
82
+
83
+ #region Projects
84
+ BASECAMP_URL = "https://basecamp.com/2452154"
85
+ BASECAMP_LOGIN = "qwegsdfs@qwe.ru"
86
+ BASECAMP_PSW = "123456"
87
+ IMPORT_CLOSED_PROJECTS = true
88
+ DISABLE_NOTIFICATONS = false
89
+ IMPORT_USERS_AS_COLLABORATORS = true
90
+ PROJECT_ID_FOR_OPERATIONS = '4322'
91
+ MESSAGE_ID = '3878'
92
+
93
+ TASK_ID = '12406'
94
+ RESPONSIBLE_ID = '187ecad1-eeb4-4173-a6c0-1c225ad72fb2'
95
+ RANDOM_TITLE = random_word(10, true)
96
+ PROJECT_DESCRIPTION = random_word(10, true)
97
+ ANOTHER_PROJECT_ID = 9735
98
+ MILESTONE_ID = 422849
99
+ SOME_DATE = '2015-03-23T14:27:14'
100
+ ANOTHER_DATE = '2015-06-10T06:30:00.0000000-07:00'
101
+ SIMPLE_DATE = '2011-10-1'
102
+ RANDOM_NOTE = random_word(12)
103
+ TIME_ID = 528238
104
+ #endregion
105
+
106
+ #region CRM
107
+ OPPORTUNITY_COLOR_NAME = 'red'
108
+ OPPORTUNITY_ID = '74156'
109
+ SUCCESS_PROBABILITY = 18
110
+ BID_TYPE = 'PerMonth'
111
+ PER_PERIOD_VALUE = 345
112
+ STAGE_ID = 110331
113
+ CONTACTS_IDS = [2971532, 2971531, 75613, 3065356, 3065355, 3065354, 3065353]
114
+ CONTACT_ID = 3065356
115
+ CONTACT_TYPE_ID = 235222
116
+ IS_PRIVATE = true
117
+ INVOICE_ID = 74
118
+ CATEGORY_ID = 1979
119
+ RANDOM_TAGS = [random_word(3), random_word(5)]
120
+ AUTOGENERATED = true
121
+ INVOICE_STATUS = 'Paid'
122
+ CONTACT_STATUS_ID = 1990
123
+ HISTORY_CATEGORY_ID = 241050
124
+ COMPANY_ID = 2971531
125
+ CONTACT_INFORMATION_ID = 452955
126
+ NEW_RANDOM_USERS_ARRAY = (1..rand(5)).collect { {firstName: random_word(rand(3..12), true), lastName: random_word(rand(3..12), true)} }
127
+ INFO_TYPE = 1#'Phone'
128
+ INFO_DATA = 54273553
129
+ INFO_CATEGORY = 'Work'
130
+ IMAGE_URL = 'http://thebooksmugglers.com/wp-content/uploads/2009/02/image002-200x300.jpg'#'http://www.soulscode.com/wp-content/uploads/2011/02/doll-200x300.jpg'
131
+ #endregion
132
+
133
+ #region Community
134
+ POST_ID = '797eb01e-b13f-49a4-9b4c-b74b40bad876'
135
+ BOOKMARK_ID = 288498
136
+ EVENT_ID = 63569
137
+ THREAD_ID = 4988
138
+ TOPIC_ID = 26560
139
+ COMMUNITY_CATEGORY_ID = 3779
140
+ THREAD_NAME = '1'
141
+ WIKI_PAGE_NAME = 'fsdf'
142
+ WIKI_FILE_NAME = 'rapuncel.jpg'
143
+ WIKI_PAGE_COMMENT_ID = '8a72589a-f9f0-44b7-aed4-1608335f1855'
144
+ #endregion
145
+
146
+ #region Calendar
147
+ CALENDAR_ID = 1395822265100
148
+ #endregion
149
+ #endregion
data/teamlab.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'teamlab/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "teamlab"
8
+ spec.version = Teamlab::VERSION
9
+ spec.authors = ["rzagudaev"]
10
+ spec.email = ["roman-zagudaev@yandex.ru"]
11
+ spec.description = %q{Ruby Framework to interact with TeamLab API 2.0}
12
+ spec.summary = %q{Ruby gem for TeamLab}
13
+ spec.homepage = 'https://github.com/RomanZagudaev/teamlab'
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'httparty', '~> 0.11.0'
22
+ spec.add_dependency 'activesupport', '~> 3.1'
23
+ spec.add_dependency 'rspec'
24
+ spec.add_dependency 'httmultiparty'
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.3"
27
+ spec.add_development_dependency "rake"
28
+ end
metadata ADDED
@@ -0,0 +1,168 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: teamlab
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - rzagudaev
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-04-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: httparty
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.11.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.11.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: activesupport
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '3.1'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.1'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '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'
62
+ - !ruby/object:Gem::Dependency
63
+ name: httmultiparty
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
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: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: bundler
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '1.3'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '1.3'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rake
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: Ruby Framework to interact with TeamLab API 2.0
111
+ email:
112
+ - roman-zagudaev@yandex.ru
113
+ executables: []
114
+ extensions: []
115
+ extra_rdoc_files: []
116
+ files:
117
+ - .gitignore
118
+ - Gemfile
119
+ - LICENSE.txt
120
+ - README.md
121
+ - Rakefile
122
+ - lib/teamlab.rb
123
+ - lib/teamlab/Config.rb
124
+ - lib/teamlab/Modules/Calendar.rb
125
+ - lib/teamlab/Modules/Community.rb
126
+ - lib/teamlab/Modules/Crm.rb
127
+ - lib/teamlab/Modules/Files.rb
128
+ - lib/teamlab/Modules/Group.rb
129
+ - lib/teamlab/Modules/Mail.rb
130
+ - lib/teamlab/Modules/People.rb
131
+ - lib/teamlab/Modules/Project.rb
132
+ - lib/teamlab/Modules/Settings.rb
133
+ - lib/teamlab/Request.rb
134
+ - lib/teamlab/Response.rb
135
+ - lib/teamlab/version.rb
136
+ - spec/lib/Teamlab_spec.rb
137
+ - spec/spec_helper.rb
138
+ - spec/support/http_data.rb
139
+ - teamlab.gemspec
140
+ homepage: https://github.com/RomanZagudaev/teamlab
141
+ licenses:
142
+ - MIT
143
+ post_install_message:
144
+ rdoc_options: []
145
+ require_paths:
146
+ - lib
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ requirements: []
160
+ rubyforge_project:
161
+ rubygems_version: 1.8.23
162
+ signing_key:
163
+ specification_version: 3
164
+ summary: Ruby gem for TeamLab
165
+ test_files:
166
+ - spec/lib/Teamlab_spec.rb
167
+ - spec/spec_helper.rb
168
+ - spec/support/http_data.rb