slack_invitation 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 617de4e550a41a49e629683413039f55c6bc1388
4
- data.tar.gz: 8bf15d4ac46995780921f24be5453c9acdc50d92
3
+ metadata.gz: 031502d447ea0b36cbfa64e9c976455a55109e00
4
+ data.tar.gz: 6130b02c042ce126d1187d11a437d9a87d2794b6
5
5
  SHA512:
6
- metadata.gz: 40db8404cefaf663c7da55dfe55833187d66860d3a0def60ee34c47d3bd6db2a800492bd0ad5e7de47a52eb867930fd2b0b9886e4af7e21e1222ce6787995f66
7
- data.tar.gz: 6f2b4f7bd5d3ce85cea7d1df02cb3097e63f2e65a48c6ce2b7ac43e44e0cbec3fdf6a3d3e307aa905a5f7c8e46ba7537f276b72d896df671ff32f4f26d22a7db
6
+ metadata.gz: cc25fc1587659dc9f5769476a6a0600f8a3d6c91d1d6bd956301c73c7b8994c14abb20b05c037adc92cc55b931d7731127c435906d29ddb97b7ef4f2b3b2bf02
7
+ data.tar.gz: e40b7f15585d5d5abbd6c5a825e3b249c06b17af2e08759f9235ad18fd023f838e3ac17eec8de25723ce42b8795b467f6098145e3d1ffa09e4cb4894ab6c10a2
@@ -36,9 +36,14 @@ module SlackInvitation
36
36
  @driver.find_element(:id, 'email').send_keys(@admin_email)
37
37
  @driver.find_element(:id, 'password').send_keys(@admin_password)
38
38
  @driver.find_element(:id, 'signin_btn').click
39
+ true
40
+ rescue Selenium::WebDriver::Error::NoSuchElementError
41
+ false
39
42
  end
40
43
 
41
44
  def send_invitation_mail(email)
45
+ return false if email !~ /@/
46
+
42
47
  tries ||= 0
43
48
  @driver.navigate.to invitation_url
44
49
  wait tries
@@ -48,6 +53,7 @@ module SlackInvitation
48
53
  rescue Selenium::WebDriver::Error::NoSuchElementError
49
54
  wait tries
50
55
  retry unless (tries += 1) == 5
56
+ return false
51
57
  end
52
58
 
53
59
  def test_success
@@ -1,3 +1,3 @@
1
1
  module SlackInvitation
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_invitation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daekwon Kim
@@ -34,7 +34,7 @@ files:
34
34
  - lib/slack_invitation.rb
35
35
  - lib/slack_invitation/invitator.rb
36
36
  - lib/slack_invitation/version.rb
37
- homepage: http://slack.invitation.nacyot.com
37
+ homepage: http://slack-invitation.nacyot.com
38
38
  licenses:
39
39
  - MIT
40
40
  metadata: {}