Skip to content

Commit

Permalink
Moved URLOps to the library impacting geturl and github update check
Browse files Browse the repository at this point in the history
  • Loading branch information
frossm committed Feb 1, 2021
1 parent 3be35d1 commit cf7b4d2
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 110 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.fross</groupId>
<artifactId>quoter</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
<packaging>jar</packaging>

<name>quoter</name>
Expand Down Expand Up @@ -190,7 +190,7 @@
<dependency>
<groupId>org.fross</groupId>
<artifactId>library</artifactId>
<version>2020.12.23</version>
<version>2021.02.01</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: quoter
version: '2.4.1'
version: '2.4.2'
summary: Command line utility to pull stock and index quotes
description: |
Quote fetches stock quotes and index data from IEXCloud.IO.
Expand All @@ -23,7 +23,7 @@ parts:
plugin: maven
source: https://github.com/frossm/library.git
source-type: git
source-tag: 'v2020.12.23'
source-tag: 'v2021.02.01'
maven-options: [install]

quoter:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/quoter/FileExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/quoter/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/fross/quoter/HistoricalQuotes.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -30,6 +30,7 @@
import java.util.TreeMap;

import org.fross.library.Output;
import org.fross.library.URLOperations;
import org.fusesource.jansi.Ansi;

import com.google.gson.Gson;
Expand All @@ -56,7 +57,7 @@ public static Map<String, Float> getHistoricalQuotes(String symb, String token)

// Query IEXCloud's REST API and get the historical security information in JSON format
try {
rawChartData = URLOps.ReadURL(quoteURL);
rawChartData = URLOperations.ReadURL(quoteURL);
} catch (Exception ex) {
Output.fatalError("Could not query historical data from IEXCloud", 3);
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/fross/quoter/Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* * Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -32,6 +32,7 @@

import org.fross.library.Debug;
import org.fross.library.Output;
import org.fross.library.URLOperations;
import org.fusesource.jansi.Ansi;

public class Index {
Expand Down Expand Up @@ -68,7 +69,7 @@ protected static String[] getIndex(String idx) {

try {
// Download the web page with
idxPage = URLOps.ReadURL(URL);
idxPage = URLOperations.ReadURL(URL);

// Define the regular expression patterns to look for in the URL provided above
searchPatterns[1] = "\"last\":\"(.*?)\"";
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/fross/quoter/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -35,6 +35,7 @@
import java.util.Scanner;

import org.fross.library.Debug;
import org.fross.library.GitHub;
import org.fross.library.Output;
import org.fusesource.jansi.Ansi;

Expand Down Expand Up @@ -138,7 +139,7 @@ public static void main(String[] args) {
case 'v':
Output.printColorln(Ansi.Color.WHITE, "Quoter Version: v" + VERSION);
Output.printColorln(Ansi.Color.CYAN, COPYRIGHT);
Output.printColorln(Ansi.Color.WHITE, "\nLatest Release on GitHub: " + URLOps.updateCheck("quoter"));
Output.printColorln(Ansi.Color.WHITE, "\nLatest Release on GitHub: " + GitHub.updateCheck("quoter"));
Output.printColorln(Ansi.Color.CYAN, "HomePage: https://github.com/frossm/quoter");
System.exit(0);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fross/quoter/Prefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/fross/quoter/Symbol.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Quoter is a command line program that display stock quotes and index data.
*
* Copyright (c) 2019 Michael Fross
* Copyright (c) 2019-2021 Michael Fross
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -37,6 +37,7 @@
import org.fross.library.Debug;
import org.fross.library.Format;
import org.fross.library.Output;
import org.fross.library.URLOperations;
import org.fusesource.jansi.Ansi;

import com.google.gson.Gson;
Expand Down Expand Up @@ -157,7 +158,7 @@ private static HashMap<String, String> getQuote(String symb, String token) {

// Query IEXCloud's REST API and get the security information in JSON format
try {
quoteDetail = URLOps.ReadURL(quoteURL);
quoteDetail = URLOperations.ReadURL(quoteURL);

} catch (Exception ex) {
returnData.put("symbol", symb);
Expand Down
95 changes: 0 additions & 95 deletions src/main/java/org/fross/quoter/URLOps.java

This file was deleted.

0 comments on commit cf7b4d2

Please sign in to comment.