adn-cli 0.0.2 → 0.0.3

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.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ADN
4
4
  class CLI
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.3"
6
6
  end
7
7
  end
data/lib/adn/cli.rb CHANGED
@@ -22,8 +22,8 @@ module ADN
22
22
  trap("INT"){ exit }
23
23
 
24
24
  loop {
25
- sleep 4
26
25
  show_global_feed
26
+ sleep 4
27
27
  }
28
28
  end
29
29
 
@@ -37,13 +37,14 @@ module ADN
37
37
  private
38
38
 
39
39
  def get_global_feed
40
- url = 'https://alpha-api.app.net/' +
41
- 'stream/0/posts/stream/global?' +
42
- 'count=10&include_directed_posts=1'
40
+ params = {
41
+ count: 10,
42
+ include_directed_posts: 1
43
+ }
43
44
 
44
- url += "&since_id=#{@since_id}" unless @since_id.nil?
45
+ params[:since_id] = @since_id unless @since_id.nil?
45
46
 
46
- ADN::API.get(url)
47
+ ADN::API::Post.global_stream(params)
47
48
  end
48
49
 
49
50
  def update_since_id(response)
data/public/index.html CHANGED
@@ -1,15 +1,38 @@
1
+ <!DOCTYPE html>
1
2
  <html>
2
- <head>
3
+ <head>
4
+ <title>Thank you for authorizing adn-cli</title>
5
+ <style>
6
+ body {
7
+ font-family: Helvetica, sans-serif;
8
+ }
3
9
 
4
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
5
- <script type="text/javascript">
10
+ .angled {
11
+ background-color: #C5E0DC;
12
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%,
13
+ transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%,
14
+ transparent 75%, transparent);
15
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%,
16
+ transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%,
17
+ transparent 75%, transparent);
18
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%,
19
+ transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%,
20
+ transparent 75%, transparent);
21
+ }
6
22
 
7
- $.get("/save-token?" + window.location.hash.substring(1))
8
-
9
- </script>
10
-
11
- </head>
12
-
13
- <body>
14
- Thank you for authorizing.
15
- </body>
23
+ .stripes {
24
+ -webkit-background-size: 50px 50px;
25
+ -moz-background-size: 50px 50px;
26
+ background-size: 50px 50px; /* Controls the size of the stripes */
27
+ }
28
+ </style>
29
+ </head>
30
+ <body class="angled stripes">
31
+ <h1>Thank you for authorizing adn-cli</h1>
32
+ <h2>You can now close this window and return to the terminal.</h2>
33
+ <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
34
+ <script type="text/javascript">
35
+ $.get("/save-token?" + window.location.hash.substring(1));
36
+ </script>
37
+ </body>
38
+ </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adn-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: