hubstats 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +8 -8
  2. data/.automation.yml +1 -0
  3. data/.gitignore +11 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +12 -0
  6. data/Gemfile +17 -0
  7. data/Gemfile.lock +144 -0
  8. data/hubstats.gemspec +28 -0
  9. data/lib/hubstats/version.rb +1 -1
  10. data/script/rails +8 -0
  11. data/spec/controllers/hubstats/events_controller_spec.rb +7 -0
  12. data/spec/controllers/hubstats/pull_requests_controller_spec.rb +7 -0
  13. data/spec/controllers/hubstats/repos_controller_spec.rb +7 -0
  14. data/spec/controllers/hubstats/users_controller_spec.rb +7 -0
  15. data/spec/factories/comment.rb +23 -0
  16. data/spec/factories/pull_requests.rb +26 -0
  17. data/spec/factories/repo.rb +16 -0
  18. data/spec/factories/users.rb +16 -0
  19. data/spec/helpers/hubstats/events_helper_spec.rb +17 -0
  20. data/spec/helpers/hubstats/pull_requests_helper_spec.rb +17 -0
  21. data/spec/helpers/hubstats/repos_helper_spec.rb +17 -0
  22. data/spec/helpers/hubstats/users_helper_spec.rb +17 -0
  23. data/spec/lib/hubstats/events_handler_spec.rb +51 -0
  24. data/spec/lib/hubstats/github_api_spec.rb +76 -0
  25. data/spec/models/hubstats/comment_spec.rb +38 -0
  26. data/spec/models/hubstats/label_spec.rb +7 -0
  27. data/spec/models/hubstats/pull_request_spec.rb +13 -0
  28. data/spec/models/hubstats/repo_spec.rb +7 -0
  29. data/spec/models/hubstats/user_spec.rb +23 -0
  30. data/spec/spec_helper.rb +55 -0
  31. metadata +52 -164
  32. data/test/dummy/config/octokit.yml +0 -11
  33. data/test/dummy/db/migrate/20140703201046_create_hubstats_pull_requests.hubstats.rb +0 -40
  34. data/test/dummy/db/migrate/20140703201047_create_hubstats_users.hubstats.rb +0 -26
  35. data/test/dummy/db/migrate/20140703201048_create_hubstats_comments.hubstats.rb +0 -30
  36. data/test/dummy/db/migrate/20140703201049_create_hubstats_repos.hubstats.rb +0 -48
  37. data/test/dummy/db/migrate/20140703201050_create_hubstats_labels.hubstats.rb +0 -10
  38. data/test/dummy/db/migrate/20140703201051_create_hubstats_labels_pull_requests.hubstats.rb +0 -9
  39. data/test/dummy/log/development.log +0 -0
  40. data/test/dummy/log/production.log +0 -5
  41. data/test/dummy/log/test.log +0 -19745
  42. data/test/dummy/tmp/cache/assets/C6A/070/sprockets%2F722061c11245ef57a10b2a8b249536a6 +0 -0
  43. data/test/dummy/tmp/cache/assets/C80/780/sprockets%2Fc1cf9f40564205993336f5119dc8301d +0 -0
  44. data/test/dummy/tmp/cache/assets/C86/E00/sprockets%2F652cdc396e5788a9241b9355e4c10640 +0 -0
  45. data/test/dummy/tmp/cache/assets/C97/B60/sprockets%2Faec576e1f9385471867ed31d55077188 +0 -0
  46. data/test/dummy/tmp/cache/assets/CA0/2B0/sprockets%2F00310502bf37155c1d795a84d46e1fa7 +0 -0
  47. data/test/dummy/tmp/cache/assets/CA2/FC0/sprockets%2Fc0a86d68e0c4a2374484370da89d1000 +0 -0
  48. data/test/dummy/tmp/cache/assets/CAC/770/sprockets%2F6f6eca43ba817098511ce082222681e7 +0 -0
  49. data/test/dummy/tmp/cache/assets/CAD/3D0/sprockets%2F781852b612e12270af6602bdb8f985a4 +0 -0
  50. data/test/dummy/tmp/cache/assets/CBC/4C0/sprockets%2F43796510bea9e088167ff07f3d0a8484 +0 -0
  51. data/test/dummy/tmp/cache/assets/CD1/790/sprockets%2F825aafb951c27a7ca74309144540cc51 +0 -0
  52. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  53. data/test/dummy/tmp/cache/assets/CDA/040/sprockets%2Fb4d91e72711bf28f408e6501a40539bf +0 -0
  54. data/test/dummy/tmp/cache/assets/CDA/DA0/sprockets%2F14ee3d4688023382bc33a3bb149f3f75 +0 -0
  55. data/test/dummy/tmp/cache/assets/CDB/3F0/sprockets%2Fe3dd42740d72fd4147cc2bc430554858 +0 -0
  56. data/test/dummy/tmp/cache/assets/CE1/620/sprockets%2F2eaf40f9364d1a5fc929f615681430e2 +0 -0
  57. data/test/dummy/tmp/cache/assets/CE3/FF0/sprockets%2Fcef2250ca879df25864e46743811b34a +0 -0
  58. data/test/dummy/tmp/cache/assets/CE5/950/sprockets%2F6011591ca606d6465ffe00aa59798f4f +0 -0
  59. data/test/dummy/tmp/cache/assets/CED/160/sprockets%2Fd17778dcc64ba05d748e9596851b42b2 +0 -0
  60. data/test/dummy/tmp/cache/assets/D00/000/sprockets%2Fca55ed2e244f0ae2454363027cae0865 +0 -0
  61. data/test/dummy/tmp/cache/assets/D07/C60/sprockets%2Fad1ce92f0e63a75c63272177af6c0542 +0 -0
  62. data/test/dummy/tmp/cache/assets/D0D/BB0/sprockets%2F4b4c7844619dabbb1b0f7e2074492e84 +0 -0
  63. data/test/dummy/tmp/cache/assets/D1B/C20/sprockets%2F7246ab80e3a902497a99edde782139bd +0 -0
  64. data/test/dummy/tmp/cache/assets/D1E/160/sprockets%2F6b06e88c694fe253732afa662e4b83d8 +0 -0
  65. data/test/dummy/tmp/cache/assets/D1E/690/sprockets%2F87b902b589445ed855fa47700d19ddcd +0 -0
  66. data/test/dummy/tmp/cache/assets/D20/FF0/sprockets%2F941bab9382328e98fd569386d1ec0af5 +0 -0
  67. data/test/dummy/tmp/cache/assets/D21/C00/sprockets%2F8d98ccfd866c7b6d27c557031ed18173 +0 -0
  68. data/test/dummy/tmp/cache/assets/D29/830/sprockets%2Fd625d52591e79dd7ea694da983763e1f +0 -0
  69. data/test/dummy/tmp/cache/assets/D2F/DC0/sprockets%2Fdb2533855a0541d30ee3fb4c952a9ab3 +0 -0
  70. data/test/dummy/tmp/cache/assets/D32/070/sprockets%2F7e8b1f51c452335eaa6dc3ac440332f9 +0 -0
  71. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  72. data/test/dummy/tmp/cache/assets/D36/3E0/sprockets%2Fe7b229d2e8b64144c71d471fa910a2dd +0 -0
  73. data/test/dummy/tmp/cache/assets/D36/A00/sprockets%2F75301ef3d29df5cff0d6594be00a2117 +0 -0
  74. data/test/dummy/tmp/cache/assets/D38/CB0/sprockets%2F29c1b9d8419784ce13da2b3f174ac2d1 +0 -0
  75. data/test/dummy/tmp/cache/assets/D3A/D50/sprockets%2Ff40159b97cbd42cd120ab6db69d67182 +0 -0
  76. data/test/dummy/tmp/cache/assets/D3C/190/sprockets%2F5fe63949cfff6024125e2c1ef0242cd3 +0 -0
  77. data/test/dummy/tmp/cache/assets/D3D/470/sprockets%2Ff6740e85131eb3c5c3836792c5db0ccd +0 -0
  78. data/test/dummy/tmp/cache/assets/D45/FE0/sprockets%2F71e7d22428abdfaf957abc097437178b +0 -0
  79. data/test/dummy/tmp/cache/assets/D46/F70/sprockets%2Ff8b0242cb6b63299e67b9356ed34e3bc +0 -0
  80. data/test/dummy/tmp/cache/assets/D47/F60/sprockets%2F275572ae8865ec1ffa9a17b4c658b0b6 +0 -0
  81. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  82. data/test/dummy/tmp/cache/assets/D51/7F0/sprockets%2Fe483e54cab3b78e5959d5bc422692ff5 +0 -0
  83. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  84. data/test/dummy/tmp/cache/assets/D5D/880/sprockets%2F49469a907bfe2696eb66b3d69d69cc6b +0 -0
  85. data/test/dummy/tmp/cache/assets/D62/F50/sprockets%2Fe4fa88230ba5d4b30cd36d170c2f57a8 +0 -0
  86. data/test/dummy/tmp/cache/assets/D68/7C0/sprockets%2F53c50d8f33708cb75b09c0d4c7d3caf3 +0 -0
  87. data/test/dummy/tmp/cache/assets/D6B/570/sprockets%2F70c5d0418ce288f30ad3d949fd31a0ef +0 -0
  88. data/test/dummy/tmp/cache/assets/D7E/2C0/sprockets%2Fe11fb7d12e6f167b56f4b939b65c97fb +0 -0
  89. data/test/dummy/tmp/cache/assets/D7F/5B0/sprockets%2F842879ad233dad55dc6c3f23eed939f6 +0 -0
  90. data/test/dummy/tmp/cache/assets/D81/B70/sprockets%2F7b0f8c0b8a0e320eaaa66e350144e3bb +0 -0
  91. data/test/dummy/tmp/cache/assets/D85/310/sprockets%2F5bfbaf42e04878ffee659890736e5ac4 +0 -0
  92. data/test/dummy/tmp/cache/assets/D95/E70/sprockets%2F71e192cc81e15e41babc78da4a549b5b +0 -0
  93. data/test/dummy/tmp/cache/assets/D9A/300/sprockets%2F044ebd5e75412ceead3574d6d3eed550 +0 -0
  94. data/test/dummy/tmp/cache/assets/D9E/0F0/sprockets%2Fddaeeb8234f096140f35c06ff538bbe6 +0 -0
  95. data/test/dummy/tmp/cache/assets/DAA/D80/sprockets%2Fe7bd68eb95e047454adfc49e5f0b8e11 +0 -0
  96. data/test/dummy/tmp/cache/assets/DC7/5C0/sprockets%2F4af3c5fb39b4b93a7fc1c5db2c05c583 +0 -0
  97. data/test/dummy/tmp/cache/assets/DC7/950/sprockets%2Fb2e4de5539bdbb6b902390acad4f384d +0 -0
  98. data/test/dummy/tmp/cache/assets/DD8/5A0/sprockets%2Fdc77251d6c233eeecb693ff083f35eee +0 -0
  99. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  100. data/test/dummy/tmp/cache/assets/DDD/E60/sprockets%2Fe81c794a9e4d16cb9e35c8b8ee5b6b2c +0 -0
  101. data/test/dummy/tmp/cache/assets/DDE/160/sprockets%2Fad7ae04f67dc2e97b7956ea219e4bc8f +0 -0
  102. data/test/dummy/tmp/cache/assets/DDF/3E0/sprockets%2F59b0fb9e71148d95cf2e9e90c29cfacd +0 -0
  103. data/test/dummy/tmp/cache/assets/DF9/4E0/sprockets%2F79fba73941daca3fad36e2d68bf243aa +0 -0
  104. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  105. data/test/dummy/tmp/cache/assets/E06/450/sprockets%2Ffcd574cdf1957cd4acd029f0de961dd5 +0 -0
  106. data/test/dummy/tmp/cache/assets/E0B/7F0/sprockets%2Fec7ca66fae22eb868a78c2d97dd5c27a +0 -0
  107. data/test/dummy/tmp/cache/assets/E0F/CE0/sprockets%2F5c479ac6683cdd3e7ed01defd75e7be6 +0 -0
  108. data/test/dummy/tmp/cache/assets/E10/920/sprockets%2Fe2793fe8a9f6773e8d2d5bececb01b7f +0 -0
  109. data/test/dummy/tmp/cache/assets/E30/D10/sprockets%2F5be1e5ad45bde1dbd7fb9f8d720277ea +0 -0
  110. data/test/dummy/tmp/cache/assets/E41/A20/sprockets%2F23cef5db9fa9d95cf84a2c688b5fe6ab +0 -0
  111. data/test/dummy/tmp/cache/assets/E4E/EF0/sprockets%2F5783afe3d038c6cdce49c1cbdaa12acb +0 -0
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGJjMGNlNWFiMzEyZjE0Zjk2MGRlNTJmNGQzM2JjY2QxOTYxY2NhYw==
4
+ MzJjMjY4ZGFkODdlOTE1ZWUyYjM1MmNmNDYyNzI0NzRjNDJkNWVjYQ==
5
5
  data.tar.gz: !binary |-
6
- NGFjNTQzNjgzMjM2ZDQ4MzBmZTM1ZDZhMjg0Y2ZhNDQxMDZmOGQ5Zg==
6
+ NjMyOTljYzMzYzFmMmNkZTlkNzc2NTc1MjAyYjVmZGZhNTc4NDAyNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODVkOWJiZDczNmUzODAzNjBmZWFmNjc2YmNiODJmNzM0MmZlYjg3Y2JhMzk2
10
- OWY0MmYxMTZlNmUyZGNmMWYxNTkzMzM4MTJkMDM1N2EzMjhhODVmOTE1NTc4
11
- YmNhZGJjMzE4NjVlNDJhOWM4ZDNlYjNiZjUxNTRjMWI4NmJlYjk=
9
+ ZDBiYjUxZDAyNjRlN2MwNzNkNzlhNzM5ZWI2ZmM5MDBjNTVlMTI5ZjFhMzU5
10
+ NjZmYTNiZGUxNDFhZWQzNmNiYmU4Njc5YWYyMjU1ZTc5OTIyYjJhZWNkNjkw
11
+ ZTI5Nzc2YzJhYjNjMDk1ODRmZjRiZDQ3NTdjMmViY2Q0Nzc0Yzg=
12
12
  data.tar.gz: !binary |-
13
- YWUwYzIzMjRmMmVlMjYwYjU4MjFhNmZhZTdkMmVlYjg5ZTA1YWIyNDBkM2Mw
14
- ZmJiOTdmOTI5NDFhMjYyYWUyMzc0NWQ2YmY5M2YzMTAxNGNiODgxYzliMzQw
15
- ZGRmNGEzZmM2MmJlYzg2NmI4MGI2ZGY4ZjdlOTdjODI3ZDRlMjU=
13
+ OGFmNWI3ZWE2ZTJjMWU2MzJjMDc4MDhiZWNiMDlmNWVlNTliNzM4OTY3Yzc1
14
+ ZDMzNjEyZjU0ZmZiNmFmMDdkMDNjNjQ5NzdjNDRmMjVlMTYzNGQxMGUyMjE5
15
+ MDBmMTFiNjQ4MTRiNDAwYTY1Yjg1ZDBlMTE1NjQ3NTlmYmViMzA=
@@ -0,0 +1 @@
1
+ github_repo: sportngin/hubstats
@@ -0,0 +1,11 @@
1
+ test/dummy/log/*
2
+ test/dummy/tmp/*
3
+ test/dummy/config/octokit.yml
4
+ lib/tasks/test_tasks.rake
5
+ test/dummy/db/migrate/*
6
+ *.gem
7
+ *.rbc
8
+ .bundle
9
+ .config
10
+ .DS_Store
11
+ .gitkeep
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ env:
3
+ - RAILS_VERSION=4.0
4
+ - RAILS_VERSION=3.2
5
+ rvm:
6
+ - 1.9.3
7
+ - 2.0.0
8
+ script: bundle exec rspec
9
+ before_script:
10
+ - bundle exec rake app:db:create
11
+ - bundle exec rake app:db:migrate
12
+ - bundle exec rake app:db:test:prepare
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in hubstats.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # jquery-rails is used by the dummy application
9
+ gem "jquery-rails"
10
+ gem "mysql2"
11
+ # Declare any dependencies that are still in development here instead of in
12
+ # your gemspec. These might include edge Rails or gems from your path or
13
+ # Git. Remember to move these dependencies to your gemspec before releasing
14
+ # your gem to rubygems.org.
15
+
16
+ # To use debugger
17
+ # gem 'debugger'
@@ -0,0 +1,144 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hubstats (0.0.20)
5
+ octokit (~> 3.2)
6
+ rails (~> 3.2.18)
7
+ select2-rails (~> 3.5)
8
+ will_paginate-bootstrap
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionmailer (3.2.19)
14
+ actionpack (= 3.2.19)
15
+ mail (~> 2.5.4)
16
+ actionpack (3.2.19)
17
+ activemodel (= 3.2.19)
18
+ activesupport (= 3.2.19)
19
+ builder (~> 3.0.0)
20
+ erubis (~> 2.7.0)
21
+ journey (~> 1.0.4)
22
+ rack (~> 1.4.5)
23
+ rack-cache (~> 1.2)
24
+ rack-test (~> 0.6.1)
25
+ sprockets (~> 2.2.1)
26
+ activemodel (3.2.19)
27
+ activesupport (= 3.2.19)
28
+ builder (~> 3.0.0)
29
+ activerecord (3.2.19)
30
+ activemodel (= 3.2.19)
31
+ activesupport (= 3.2.19)
32
+ arel (~> 3.0.2)
33
+ tzinfo (~> 0.3.29)
34
+ activeresource (3.2.19)
35
+ activemodel (= 3.2.19)
36
+ activesupport (= 3.2.19)
37
+ activesupport (3.2.19)
38
+ i18n (~> 0.6, >= 0.6.4)
39
+ multi_json (~> 1.0)
40
+ addressable (2.3.6)
41
+ arel (3.0.3)
42
+ builder (3.0.4)
43
+ diff-lcs (1.2.5)
44
+ erubis (2.7.0)
45
+ factory_girl (4.4.0)
46
+ activesupport (>= 3.0.0)
47
+ factory_girl_rails (4.4.1)
48
+ factory_girl (~> 4.4.0)
49
+ railties (>= 3.0.0)
50
+ faker (1.4.1)
51
+ i18n (~> 0.5)
52
+ faraday (0.9.0)
53
+ multipart-post (>= 1.2, < 3)
54
+ hike (1.2.3)
55
+ i18n (0.6.11)
56
+ journey (1.0.4)
57
+ jquery-rails (3.1.1)
58
+ railties (>= 3.0, < 5.0)
59
+ thor (>= 0.14, < 2.0)
60
+ json (1.8.1)
61
+ mail (2.5.4)
62
+ mime-types (~> 1.16)
63
+ treetop (~> 1.4.8)
64
+ mime-types (1.25.1)
65
+ multi_json (1.10.1)
66
+ multipart-post (2.0.0)
67
+ mysql2 (0.3.16)
68
+ octokit (3.2.0)
69
+ sawyer (~> 0.5.3)
70
+ polyglot (0.3.5)
71
+ rack (1.4.5)
72
+ rack-cache (1.2)
73
+ rack (>= 0.4)
74
+ rack-ssl (1.3.4)
75
+ rack
76
+ rack-test (0.6.2)
77
+ rack (>= 1.0)
78
+ rails (3.2.19)
79
+ actionmailer (= 3.2.19)
80
+ actionpack (= 3.2.19)
81
+ activerecord (= 3.2.19)
82
+ activeresource (= 3.2.19)
83
+ activesupport (= 3.2.19)
84
+ bundler (~> 1.0)
85
+ railties (= 3.2.19)
86
+ railties (3.2.19)
87
+ actionpack (= 3.2.19)
88
+ activesupport (= 3.2.19)
89
+ rack-ssl (~> 1.3.2)
90
+ rake (>= 0.8.7)
91
+ rdoc (~> 3.4)
92
+ thor (>= 0.14.6, < 2.0)
93
+ rake (10.3.2)
94
+ rdoc (3.12.2)
95
+ json (~> 1.4)
96
+ rspec-core (3.0.2)
97
+ rspec-support (~> 3.0.0)
98
+ rspec-expectations (3.0.2)
99
+ diff-lcs (>= 1.2.0, < 2.0)
100
+ rspec-support (~> 3.0.0)
101
+ rspec-mocks (3.0.2)
102
+ rspec-support (~> 3.0.0)
103
+ rspec-rails (3.0.1)
104
+ actionpack (>= 3.0)
105
+ activesupport (>= 3.0)
106
+ railties (>= 3.0)
107
+ rspec-core (~> 3.0.0)
108
+ rspec-expectations (~> 3.0.0)
109
+ rspec-mocks (~> 3.0.0)
110
+ rspec-support (~> 3.0.0)
111
+ rspec-support (3.0.2)
112
+ sawyer (0.5.4)
113
+ addressable (~> 2.3.5)
114
+ faraday (~> 0.8, < 0.10)
115
+ select2-rails (3.5.9)
116
+ thor (~> 0.14)
117
+ shoulda-matchers (2.6.1)
118
+ activesupport (>= 3.0.0)
119
+ sprockets (2.2.2)
120
+ hike (~> 1.2)
121
+ multi_json (~> 1.0)
122
+ rack (~> 1.0)
123
+ tilt (~> 1.1, != 1.3.0)
124
+ thor (0.19.1)
125
+ tilt (1.4.1)
126
+ treetop (1.4.15)
127
+ polyglot
128
+ polyglot (>= 0.3.1)
129
+ tzinfo (0.3.40)
130
+ will_paginate (3.0.7)
131
+ will_paginate-bootstrap (1.0.1)
132
+ will_paginate (>= 3.0.3)
133
+
134
+ PLATFORMS
135
+ ruby
136
+
137
+ DEPENDENCIES
138
+ factory_girl_rails (~> 4.4)
139
+ faker (~> 1.3)
140
+ hubstats!
141
+ jquery-rails
142
+ mysql2
143
+ rspec-rails (~> 3.0.0.beta)
144
+ shoulda-matchers (~> 2.6)
@@ -0,0 +1,28 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "hubstats/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "hubstats"
9
+ s.version = Hubstats::VERSION
10
+ s.authors = ["Elliot Hursh"]
11
+ s.email = ["elliothursh@gmail.com"]
12
+ s.homepage = ""
13
+ s.summary = "Github Statistics"
14
+ s.description = "Github Statistics"
15
+
16
+ s.files = `git ls-files -z`.split("\x0")
17
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
+
19
+ s.add_dependency "rails", "~> 3.2.18"
20
+ s.add_dependency "octokit", "~> 3.2"
21
+ s.add_dependency "will_paginate-bootstrap"
22
+ s.add_dependency "select2-rails", "~> 3.5"
23
+
24
+ s.add_development_dependency "rspec-rails",'~> 3.0.0.beta'
25
+ s.add_development_dependency "shoulda-matchers", "~> 2.6"
26
+ s.add_development_dependency "factory_girl_rails", "~> 4.4"
27
+ s.add_development_dependency "faker", "~> 1.3"
28
+ end
@@ -1,3 +1,3 @@
1
1
  module Hubstats
2
- VERSION = "0.0.22"
2
+ VERSION = "0.0.23"
3
3
  end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
+ ENGINE_PATH = File.expand_path('../../lib/hubstats/engine', __FILE__)
6
+
7
+ require 'rails/all'
8
+ require 'rails/engine/commands'
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ module Hubstats
4
+ RSpec.describe EventsController, :type => :controller do
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ module Hubstats
4
+ RSpec.describe PullRequestsController, :type => :controller do
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ module Hubstats
4
+ RSpec.describe ReposController, :type => :controller do
5
+
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ module Hubstats
4
+ RSpec.describe UsersController, :type => :controller do
5
+
6
+ end
7
+ end
@@ -0,0 +1,23 @@
1
+ FactoryGirl.define do
2
+ factory :comment, :class => Hubstats::Comment do
3
+ user
4
+ id {Faker::Number.number(6).to_i}
5
+ body {Faker::Lorem.sentence}
6
+ end
7
+
8
+ factory :comment_hash, class:Hash do
9
+ association :user, factory: :user_hash, strategy: :build
10
+ id {Faker::Number.number(6).to_i}
11
+ body {Faker::Lorem.sentence}
12
+ initialize_with { attributes }
13
+ end
14
+
15
+ factory :comment_payload_hash, class:Hash do
16
+ id {Faker::Number.number(6).to_i}
17
+ type ["IssueCommentEvent", "CommitCommentEvent", "PullRequestReviewCommentEvent"].sample
18
+ association :repository, factory: :repo_hash, strategy: :build
19
+ association :pull_request, factory: :pull_request_hash, strategy: :build
20
+ association :comment, factory: :comment_hash, strategy: :build
21
+ initialize_with { attributes }
22
+ end
23
+ end
@@ -0,0 +1,26 @@
1
+ FactoryGirl.define do
2
+ factory :pull_request, :class => Hubstats::PullRequest do
3
+ user
4
+ repo
5
+ id {Faker::Number.number(6).to_i}
6
+ number {|n| "#{n}".to_i}
7
+ end
8
+
9
+ factory :pull_request_hash, class:Hash do
10
+ association :user, factory: :user_hash, strategy: :build
11
+ association :repository, factory: :repo_hash, strategy: :build
12
+ id {Faker::Number.number(6).to_i}
13
+ number {|n| "#{n}".to_i}
14
+
15
+ initialize_with { attributes }
16
+ end
17
+
18
+ factory :pull_request_payload_hash, class:Hash do
19
+ id {Faker::Number.number(6).to_i}
20
+ type "PullRequestEvent"
21
+ association :repository, factory: :repo_hash, strategy: :build
22
+ association :pull_request, factory: :pull_request_hash, strategy: :build
23
+
24
+ initialize_with { attributes }
25
+ end
26
+ end
@@ -0,0 +1,16 @@
1
+ FactoryGirl.define do
2
+ factory :repo, :class => Hubstats::Repo do
3
+ id 101010
4
+ name "hubstats"
5
+ full_name "hub/hubstats"
6
+ end
7
+
8
+ factory :repo_hash, class:Hash do
9
+ id 101010
10
+ name "Hubstats"
11
+ full_name "hub/hubstats"
12
+
13
+ initialize_with { attributes }
14
+ end
15
+
16
+ end
@@ -0,0 +1,16 @@
1
+ FactoryGirl.define do
2
+ factory :user, :class => Hubstats::User do
3
+ login { Faker::Internet.user_name }
4
+ id {|n| "#{n}".to_i}
5
+ role "User"
6
+ end
7
+
8
+ factory :user_hash, class:Hash do
9
+ login { Faker::Internet.user_name }
10
+ id {|n| "#{n}".to_i}
11
+ role "User"
12
+
13
+ initialize_with { attributes }
14
+ end
15
+
16
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ # Specs in this file have access to a helper object that includes
4
+ # the EventsHelper. For example:
5
+ #
6
+ # describe EventsHelper do
7
+ # describe "string concat" do
8
+ # it "concats two strings with spaces" do
9
+ # expect(helper.concat_strings("this","that")).to eq("this that")
10
+ # end
11
+ # end
12
+ # end
13
+ module Hubstats
14
+ RSpec.describe EventsHelper, :type => :helper do
15
+
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ # Specs in this file have access to a helper object that includes
4
+ # the PullRequestsHelper. For example:
5
+ #
6
+ # describe PullRequestsHelper do
7
+ # describe "string concat" do
8
+ # it "concats two strings with spaces" do
9
+ # expect(helper.concat_strings("this","that")).to eq("this that")
10
+ # end
11
+ # end
12
+ # end
13
+ module Hubstats
14
+ RSpec.describe PullRequestsHelper, :type => :helper do
15
+
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ # Specs in this file have access to a helper object that includes
4
+ # the ReposHelper. For example:
5
+ #
6
+ # describe ReposHelper do
7
+ # describe "string concat" do
8
+ # it "concats two strings with spaces" do
9
+ # expect(helper.concat_strings("this","that")).to eq("this that")
10
+ # end
11
+ # end
12
+ # end
13
+ module Hubstats
14
+ RSpec.describe ReposHelper, :type => :helper do
15
+
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ # Specs in this file have access to a helper object that includes
4
+ # the UsersHelper. For example:
5
+ #
6
+ # describe UsersHelper do
7
+ # describe "string concat" do
8
+ # it "concats two strings with spaces" do
9
+ # expect(helper.concat_strings("this","that")).to eq("this that")
10
+ # end
11
+ # end
12
+ # end
13
+ module Hubstats
14
+ RSpec.describe UsersHelper, :type => :helper do
15
+
16
+ end
17
+ end